I am trying to use this script to act as a security feature so that you have to login, but it is giving me a Compile error - Method or data member not found. If anyone knows what the problem is I would really appreciate it. Thank you.
Private Sub Login_Click()
Dim strUser As String
Dim strPWD As String
Dim intUSL As Integer
strUser = Me.UserID
If DCount("[Password]", "[Employee Details]", "[UserID]=" & Me.UserID) > 0 Then
strPWD = DLookup("[Password]", "[Employee Details]", "[UserID]=" & Me.UserID)
If strPWD = Me.Password Then
DoCmd.OpenForm "Browse Menu"
Else
MsgBox "Please try again" & vbCrLf & vbLf & "You have entered the incorrect password.", vbCritical, "Invalid Password"
Exit Sub
End If
End If
End Sub
Private Sub Login_Click()
Dim strUser As String
Dim strPWD As String
Dim intUSL As Integer
strUser = Me.UserID
If DCount("[Password]", "[Employee Details]", "[UserID]=" & Me.UserID) > 0 Then
strPWD = DLookup("[Password]", "[Employee Details]", "[UserID]=" & Me.UserID)
If strPWD = Me.Password Then
DoCmd.OpenForm "Browse Menu"
Else
MsgBox "Please try again" & vbCrLf & vbLf & "You have entered the incorrect password.", vbCritical, "Invalid Password"
Exit Sub
End If
End If
End Sub