Hi Experts,
I need a help with my login form which contains below provided code. Problem is, for example, my login page gives message 'correct login ID and Password' when both 1234 and 12345 are entered as passwords, when the correct password is 1234. There seems to be something missing in my code, for which i would really appreciate your help. Thanks in advance.
Private Sub CmdOK_Click()
If IsNull(Me.txtLoginID) Then
MsgBox "Please Enter LoginID", vbInformation, "LogID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtPassword) Then
MsgBox "Please Enter Password", vbInformation, "Password Required"
Me.txtPassword.SetFocus
Else
'process the job
If (IsNull(DLookup("UserLogin", "LoginT", "UserLogin ='" & Me.txtLoginID.Value & "'"))) Or _
(IsNull(DLookup("Password", "LoginT", "Password ='" & Me.txtPassword.Value & "'"))) Then
MsgBox "Incorrect LoginID or Password"
Else
MsgBox "LoginID and Password correct"
End If
End If
End Sub