Password protect a single form

Kerri Storr

New member
Local time
Today, 18:26
Joined
Mar 11, 2002
Messages
8
I'm currently working for a cimpany which has several access databases, which are all accessed from the same machines. This limits the user groups I can set up.

I have a switchboard with several options on it, one of which I want to set a password for. Is there a way I can do this without using the User Group functionality?

I've defined a password table and created a login form. Is there anyway I can say If this option is clicked, only open the form if the password entered on the login form matches the one on the table?
 
Password Popup Box Not Masked

Thanks for the link, Jack!
That works pretty slick, only issue I have with it is that the password entered into the popup box isn't hidden by asterisks. It's completely readable by anyone standing around.
Any ideas on how I can make it illegible to prying eyes? :p I can't decipher where in the code (module or on the form) to add the extra protection...or even if I can find it there.
Any of you code genuises have any advice?
Forever in your debt,
Ceejay
 
OK - I guess what I need to do is create an input mask like "password" on the input box itself. Help was no help. Any ideas?
Thanks
 
Ceejay

Just set the properties of the text box to Password Format. That will give you the ******** that you are looking for
 
I'm afraid that I can't make that happen.
The MS code generates an InputBox that I don't know how to set. I tried to play with the code some, but couldn't figure out how to format it that way. I can't do anything to the box itself (can't right click or view in design, etc to make changes that way), and I'm not savvy enough to figure out how to set up the code that launches the box to do what I need.
If you can direct me further, I would be much obliged! :)
Thanks for replying!!
~Ceejay
 
You can not format an Input Box. You will have to create a custom form to do what you want.

This is a simple way to call an input box that allows the user to key a password and if correct it will open a form. Assign this code to the OnClick event of the button to open the form that you want password protected.

Code:
    Dim strInput As String
    Dim strMsg As String
    
    Beep
    strMsg = "This form is used only by the ''Special Form'' people." & vbCrLf & vbLf & "Please key the ''Special Form'' password to allow access."
    strInput = InputBox(Prompt:=strMsg, title:="Special Password")
    If strInput = "SpecialFormPassword" Then 'password is correct
        DoCmd.OpenForm "YourSpecialFormNameHere"
        DoCmd.Close acForm, Me.Name
    Else 'password is incorrect
        MsgBox "Incorrect Password!" & vbCrLf & vbLf & "You are not allowed access to the ''Special Form''.", vbCritical, "Invalid Password"
        Exit Sub
    End If

HTH
 
That works well, but it still uses an input box, so I can't format it to "****".
I will remember it for future use, though.
Thank you! ;)
~C
 

Users who are viewing this thread

Back
Top Bottom