Password protected form

ScottXe

Registered User.
Local time
Today, 21:36
Joined
Jul 22, 2012
Messages
123
I found a useful password protected form using input box and tried it successfully. However there are two issues. The password is not case sensitive and the password entered displays in the box. Is it possible to turn the password to case sensitive and the entered password is displayed as *s. Thanks!

'Attached to On Click event of cmdOpenEmpForm

Dim strPasswd

strPasswd = InputBox("Enter Password", "Restricted Form")

'Check to see if there is any entry made to input box, or if
'cancel button is pressed. If no entry made then exit sub.

If strPasswd = "" Or strPasswd = Empty Then
MsgBox "No Input Provided", vbInformation, "Required Data"
Exit Sub
End If

'If correct password is entered open Employees form
'If incorrect password entered give message and exit sub

If strPasswd = "Graham" Then
DoCmd.OpenForm "frmEmp", acNormal
Else
MsgBox "Sorry, you do not have access to this form", _
vbOKOnly, "Important Information"
Exit Sub
End If
 
Use Option Compare Binary in your declaration.

I have Option Compare Database by default and that allows Test and test, the binary clause recognises case difference.

Use Password Type for Input Mask of the textbox to get the *****

HTH
 
Before you "bless" your users with case sensitivity, weird charactres, numbers, and changes every 14 days, just think ! Is it really really that important? Can you really really expect a brute-force attack? Can Access be cracked anyway (which it mostly can)? Consider forgetting all these measeures, that in most cases simply amount to a major PITA and nothing else :D
 
Is this some specialized Admin Only form or is it a User password protected form?
Unsure how your db is setup! I'm not a fan of Case sensitive passwords and weird characters, I do believe if the db has sensitive data, an effort should be made to protect it.

Access is insecure by design so their is only so much you can do, but you can make it difficult. My opinion is most all db's should at least have a login form with some sort of built in security.
 

Users who are viewing this thread

Back
Top Bottom