出现"实时错误 '424' ,要求对象,请大家帮忙看下了,谢谢
出现"实时错误 '424' ,要求对象,请大家帮忙看下了,谢谢Private Sub Cmd1_Click()
Call main
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Then
MsgBox "输入不能为空!!", 64, " 振伟商行销售管理系统"
Else
Adodc1.RecordSource = "select * from tb_user where psw ='" & Text1.Text & "'" '这里出现黄色
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Text4.Text = Adodc1.Recordset.Fields("username")
If Text2.Text <> Text3.Text Then
MsgBox "两次输入的密码不一致,请您确认后重新输入", 32, "振伟商行销售管理系统"
Text2.Text = ""
Text3.Text = ""
Text2.SetFocus
Else
Set adoRs = adoCon.Execute("UPDATE tb_user SET psw= '" + Text3.Text + "' where username='" + Text4.Text + "'")
Adodc1.Refresh
MsgBox "密码修改成功,请您记住新密码", 64, "振伟商行销售管理系统"
End If
Else
MsgBox "没有此用户的信息,请您确认后重新输入", 32, "振伟商行销售管理系统"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text1.SetFocus
End If
End If
adoCon.Close
End Sub
Private Sub Cmd2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
End Sub
Private Sub Frame1_DragDrop(Source As Control, X As Single, Y As Single)
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text2.SetFocus
Else
End If
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text3.SetFocus
Else
End If
End Sub
Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer)
Call main
If KeyCode = 13 Then
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Then
MsgBox "输入不能为空!!", 64, "振伟商行销售管理系统"
Else
Adodc1.RecordSource = "select * from tb_user where psw ='" & Text1.Text & "'" '这里出现黄色
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Text4.Text = Adodc1.Recordset.Fields("username")
If Text2.Text <> Text3.Text Then
MsgBox "两次输入的密码不一致,请您确认后重新输入", 32, "振伟商行销售管理系统"
Text2.Text = ""
Text3.Text = ""
Text2.SetFocus
Else
Set adoRs = adoCon.Execute("UPDATE tb_user SET psw= '" + Text3.Text + "' where username='" + Text4.Text + "'")
Adodc1.Refresh
MsgBox "密码修改成功,请您记住新密码", 64, "振伟商行销售管理系统"
End If
Else
MsgBox "没有此用户的信息,请您确认后重新输入", 32, "振伟商行销售管理系统"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text1.SetFocus
End If
End If
Else
End If
adoCon.Close
End Sub