I have declared mUser as a public variable as I need to be able to alter ALL procedures depending on the input.
Option Compare Database
Public mUser As String
I am trying to check if the user types the correct entry. If I enter 'laa' or 'LAA' or 'jg' or 'JG' into my inputbox, although it debugs properly, my IF statement always forces the msgBox display. Why isn't mUser working in my IF statement? thank you for any help!!!
Private Sub Form_Open(Cancel As Integer)
mUser = InputBox("Please sign in: ", "User Sign In", , 5000, 5000)
Debug.Print mUser
Debug.Print Len(mUser)
If mUser <> "JG" Or mUser <> "laa" Or mUser <> "jg" or mUser <> "JG" Then
MsgBox "Incorrect Entry!", vbCritical
'DoCmd.Close
End If
End Sub