G
GGill
I have login form with user name and password. Currently my code works if i
enter correct password and user name it will open form and if password or
name or both is not valid then it will show msgbox. What i am looking for
saperate msgbox for password and user, if user name correct but password not
then i need show msgbox "invalid password" and same thing if user name, I
need to set focus to incorrect text box. Also if both incorrect then msgbox
"Invalid password a amd user name". Please help me out. Thanks.
======================
If txtUserName = "admin" And txtPassword = "manager" Then
DoCmd.OpenForm "frmMain"
else
If Not (txtUserName = "admin") and Not (txtPassword = "admin") Then
MsgBox "Invalid User Name and Password."
End If
End If
enter correct password and user name it will open form and if password or
name or both is not valid then it will show msgbox. What i am looking for
saperate msgbox for password and user, if user name correct but password not
then i need show msgbox "invalid password" and same thing if user name, I
need to set focus to incorrect text box. Also if both incorrect then msgbox
"Invalid password a amd user name". Please help me out. Thanks.
======================
If txtUserName = "admin" And txtPassword = "manager" Then
DoCmd.OpenForm "frmMain"
else
If Not (txtUserName = "admin") and Not (txtPassword = "admin") Then
MsgBox "Invalid User Name and Password."
End If
End If