Password Case sensitivity in a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,

I have a Table with UserID and Password, with an input mask of 'password' in
the password field.

I have created a form with 2 text boxes, UserID, Password. so the user can
input username and password.

Only problem is, when i type a password in, it is not picking up the case
sensitivity in the password field of the table.

Is there a bit of code that allows case sensitivity in a password, when
logging in using a form?

For example... If i wanted to use a password of: P455wo_rd, i want to use
exact case and special characters.

Here is my code:

Private Sub Login_Click()
' Checks entry in UserId text box, if it is null then "You must enter a
UserID" is outputted to the user
If IsNull(Me.qUserId) Then
MsgBox "You must enter a UserID"
Exit Sub

Else

' Checks entry in Password text box, if it is null then "You must enter a
valid password" is outputted to the user.
If IsNull(Me.qPassword) Then
MsgBox "You must enter a valid password"
Exit Sub

End If
End If

' Uses the DLookup function to check Username and password of the user in
"tbl_Users"
'
' If the DLookup function finds the incorrect password, it outputs "Invalid
password" to the user.
'
' If the Username and Password are correct, then the form that the DB
Administrator sets will then open for the user to input data.

If Me.qPassword.Value = DLookup("password", "tbl_Users", "UserID = '" &
Me.qUserId.Value & "'") Then

DoCmd.OpenForm "Switchboard", acNormal

Else

MsgBox "Invalid Password"

End If

' After the user has logged in the "frm_Users" will close, this is an added
security feature.
DoCmd.Close acForm, "frm_Users", acSaveNo




End Sub


martin
 
Please stick to your original post. No need to add a new thread when folks
are still working on your other one.
 
Ok, sorry about that, will take it in for the future...

Ive now got the problem sorted.

Thanks for your time

Martin
 
Back
Top