I have tried the followig codes form my logon form but for all the usernames that has been seted, only the first password in the table that allows the logon all the other passwords give on error.... help
............... ............... ............... ............... .
............... ............... ............... ............... .
Code:
If txtpassword.Value = DLookup("[pswrd]", "tbllogin", "[cbousername] =" & Me.Cbousername.Value) Then
DoCmd.Close
DoCmd.OpenForm ("frmmain")
Else
intmsg = MsgBox("Invalid Password. Choose your user name and enter a valid password!", vbOKOnly + vbCritical, "Login")
Me.txtpassword.SetFocus
Me.txtpassword.Text = ""
End If
Comment