Password with case sensitive

Sokkheng

Member
Local time
Today, 12:23
Joined
Jul 12, 2023
Messages
40
I have password input form for input user name and password, but in password text box when user input capital or lower-case it true the same way.
Example: password and Password it true the same. how to make more restrict with capital and lower-case.
Thanks
 
By default, Access is case insensitive.
See my example app which includes code to check case in an entered password using the StrComp function
 
I would also use StrComp, for completeness I still show:
Code:
Option Compare Binary '  <-- affects the whole code module! (is by the way standard, if you don't set Option Compare)
'Option Compare Database <-- here you also have to be careful, because the database could theoretically be set case insensitive
'Option Compare Text '<-- this is what I usually use, so case insensitive is fixed
Option Explicit

Private Sub Test()

   If "a" = "A" Then
      Debug.Print "a is equal to A"
   Else
      Debug.Print "a is not equal to A"
   End If

End Sub

BTW:
You won't store a password in plain text and with a non-reversible hash comparison I don't think case sensitive is that important, is it? StrComp with binary comparison I would do anyway, because it doesn't hurt. :)
 
Last edited:

Users who are viewing this thread

Back
Top Bottom