Having a issue with the login screen I created. I have created a login form for the users in which the user enters their Employee Name and Password. On the "Go" button I have put the following code to validate the Employee Name and Password are in the "Employees" Table:
If Me.Password = DLookup("Password", "Employees", "EmployeeName='" & Me.EmployeeName & "'") Then
DoCmd.Close acForm, "SplashScreen"
Else
MsgBox "You have entered an incorrect Employee Name and Password combination. Please Try Again"
End If
End Sub
It works fine for the first user record in the table but for all subsequent users I receive the error message eventhough the Employee Name and Password combination is correct.
Appreciate all the help.
Joe B
If Me.Password = DLookup("Password", "Employees", "EmployeeName='" & Me.EmployeeName & "'") Then
DoCmd.Close acForm, "SplashScreen"
Else
MsgBox "You have entered an incorrect Employee Name and Password combination. Please Try Again"
End If
End Sub
It works fine for the first user record in the table but for all subsequent users I receive the error message eventhough the Employee Name and Password combination is correct.
Appreciate all the help.
Joe B