快来帮忙,这段程序哪出错了!!!
Private Sub cmdOK_Click()
Dim rs As Recordset
Dim db As Database
Dim ws As Workspace
Set db = OpenDatabase("C:\Program Files\Microsoft Visual Studio\VB98\销售管理\userlist.mdb")
Set rs = db.OpenRecordset("select * from userlist where username='& txtusername.text &'", dbOpenDynaset)
If rs.NoMatch Then
MsgBox "无此用户"
Else
If rs.fields("password") = txtPassword.Text Then
LoginSucceeded = True
Me.Hide
MsgBox "登录成功"
Else
MsgBox "口令错误"
End If
End If
End Sub
提示,无此用户,请各位大侠指教