Private Sub cmdenter_Click()
On Error GoTo errorhandler
If txtmid.Text = "" Then
MsgBox "请输入账号!", 16, "管理员登录"
txtmid.SetFocus
ElseIf txtmkey.Text = "" Then
MsgBox "请输密码!", 16, "管理员登录"
txtmkey.SetFocus
End If
Adodc1.RecordSource = "select * from 管理员表"
Adodc1.Refresh
Do While Not Adodc1.Recordset.EOF
If txtmid.Text = Adodc1.Recordset.Fields("管理员编号") And txtmkey.Text = Adodc1.Recordset.Fields("管理员密码") Then
Unload Me
main.Show
Else
End If
Adodc1.Recordset.MoveNext
Loop
errorhandler:
MsgBox "信息错误,验证失败,请重新输入!"
End Sub
这个代码,不知道哪有问题,始终都只执行"MsgBox "信息错误,验证失败,请重新输入!"",其他没有任何效果...(除了前面为空的那个)保证在表里面的信息都是正确的,表名也没错~
各种冰天雪地裸体跪求帮助~