Hi
I have written the following code to check for password before accessing the system. My problem is that it doesn't distinguish between capital and small letters. As my actual password is Aman123, If I type in the textbox aman123 then it again works but I dont want it to work if a person type small letter instead of capital letter.
I hope anyone can help me in this.
Regards
Aman
I have written the following code to check for password before accessing the system. My problem is that it doesn't distinguish between capital and small letters. As my actual password is Aman123, If I type in the textbox aman123 then it again works but I dont want it to work if a person type small letter instead of capital letter.
Code:
Private Sub Command28_Click()
If IsNull(Text26.Value) Or Trim(Text26.Value) = "" Then
MsgBox "User name or Password is incorrect or you may not have permissions to use this system.", vbCritical, "Access Denied"
Text26.SetFocus
End If
If DLookup("[UserPassword]", "tbluser", "UserName='" & Label25.Caption & "'") = Text26.Value Then
Text26.Value = ""
Label49.Visible = True
Label50.Visible = True
Else
MsgBox "User name or Password is incorrect or you may not have permissions to use this system.", vbCritical, "Access Denied"
Text26.SetFocus
End If
End Sub
I hope anyone can help me in this.
Regards
Aman