我正在使用Ms-Access做一个学校管理系统项目。我正在尝试创建多个用户的登录页面,但出现此错误。
运行时错误'438':对象不支持此属性或方法
以下是VB代码。
Private Sub Command23_Click()
If IsNull(Me.txtUsername) Then
MsgBox "Please enter Username", vbInformation, "Username Required"
ElseIf IsNull(Me.txtPassword) Then
MsgBox "Please enter Password", vbInformation, "Password Required"
Else
If Nz(DLookup("Password", "Users", "Username ='" & Me.txtUsername & "'"), "Password") = Me.txtPassword Then
MsgBox "Welcome Back", vbInformation, "Access Allowed"
Else
MsgBox "Sorry ....Wrong Username and Password", vbExclamation, "Access Denied"
End If
End If
End Sub