I have a form with two controls that is formatted as a "Password". I use the
second control as a confirmation that the user has typed in the correct
password in the first control. It works fine, except it allows the second
password even if the user did not type in the same case--upper or lower. How
can I enforce my database to require the password to be case specific?
Thank you

Signature
Don Rountree
BruceM - 30 May 2007 20:04 GMT
You can use the StrComp function, with vbBinaryCompare:
' Check to see if the two passwords contain the same characters
If StrComp(Me.txtPswd1,Me.txtPswd2,vbTextCompare) = 0 Then
' Check to see if the two passwords have the same case
If StrComp(Me.txtPswd1,Me.txtPswd2,vbBinaryCompare) <> 0 Then
MsgBox "Passwords don't match"
Me.txtPswd1 = Null
Me.txtPswd2 = Null
End If
End If
This is untested code. See VBA Help for more information about StrComp.
>I have a form with two controls that is formatted as a "Password". I use
>the
[quoted text clipped - 5 lines]
>
> Thank you
Don - 30 May 2007 20:20 GMT
Thank you.

Signature
Don Rountree
> You can use the StrComp function, with vbBinaryCompare:
>
[quoted text clipped - 19 lines]
> >
> > Thank you
Maurice - 30 May 2007 20:07 GMT
Don,
Maybe something like this:
if strComp(password, userpassword, vbBinaryCompare)<>0 then
..... your code here.
end if
where password is the password which the usere entered and userpassword is
the password to compare it with.

Signature
Maurice Ausum
> I have a form with two controls that is formatted as a "Password". I use the
> second control as a confirmation that the user has typed in the correct
[quoted text clipped - 3 lines]
>
> Thank you
Don - 30 May 2007 20:20 GMT
Thank you.

Signature
Don Rountree
> Don,
>
[quoted text clipped - 14 lines]
> >
> > Thank you