(求助)修改密码的时候输入原密码正确为什么提示错误?
Private Sub Command1_Click()On Error Resume Next
Dim Password As String
Dim Newpassword As String
Password = Text1.Text
Newpassword = Text2.Text
Set Mydb = ExeCutesql("SELECT pass from user1 WHERE user='" & Cname & "'", Str_text)
If Not Password = Mydb.Fields(0) Then
MsgBox "原密码输入错误!", vbOKOnly + 32, "注意"
Text2.Text = ""
Text3.Text = ""
Text2.SetFocus
Else
If Text3.Text <> Newpassword Then
MsgBox "你两次输入密码不一致,请重新输入!", vbOKOnly + 32, "注意"
Text1.SetFocus
Else
ExeCutesql "UPDATE user1 SET pass= '" & Newpassword & "' where user='" & Cname & "'", ""
MsgBox "密码更改成功!", vbOKOnly + 64, "注意"
Unload Me
End If
End If
End Sub