救命啊!捆饶了我3个月的问题
高手救我!BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录 Private Sub Command1_Click()
Adodc1.RecordSource = "select * from user where name='" + DataCombo1.BoundText + "'"
Adodc1.Refresh
If DataCombo1.BoundText <> "" And Text1.Text <> "" And Text1.Text = Adodc1.Recordset.Fields("password") Then
Load Form2
Form2.Show
Unload Me
Else
If tim = 2 Then
myval = MsgBox("密码错误!", 0, "")
If myval = vbOK Then End
End If
If DataCombo1.BoundText = "" Then
MsgBox ("请输入操作员!")
DataCombo1.SetFocus
Else
If DataCombo1.BoundText <> Adodc1.Recordset.Fields("name") Then
MsgBox ("查无此操作员!请重新输入")
DataCombo1.SetFocus
Else
If Text1.Text = "" Then
MsgBox ("请输入操作员密码!")
Text1.Text = ""
Text1.SetFocus
Else
If Text1.Text <> Adodc1.Recordset.Fields("password") Then
MsgBox ("密码错误,请重新输入!")
tim = tim + 1
Text1.Text = ""
Text1.SetFocus
End If
End If
End If
End If
End If
End Sub
教我详细改改``感激不尽
我数据库里有2条数据