Below is a DLookUp expression I used in a access table that works perfectly. It reads from the table "tblUsers"
If Me.Password.Value = DLookup("Password", "tblUsers", "UserName='" & Me.Username.Value & "'") Then
DoCmd.OpenForm "frmNavigation", acNormal
Else
MsgBox "The password you entered is incorrect", vbOKOnly, "Login"
End If
I have since converted the table to SQL and changed the table from which the DLookUP would read from "tblUsers" to "dbo_tblUsers":
If Me.Password.Value = DLookup("Password", "dbo_tblUsers", "UserName='" & Me.Username.Value & "'") Then
DoCmd.OpenForm "frmNavigation", acNormal
Me.UserLookup.Value = (myUser)
Else
MsgBox "The password you entered is incorrect", vbOKOnly, "Login"
End If
I know that the username and password are correct but with the SQL table (dbo_tblUsers) I keep getting the message "The password you entered is incorrect", which is the 'Else' message from the If statement"
How I I fix this?
Thanks for any help I can get