Switchboard passwords

L

Lisa

I have two switchboard pages. One with options for a user and one with
options for an admin. On the main switchboard I have two selections: user and
admin. I want to be able to attach a password to the admin selection so that
when someone clicks it they will be prompted for a password and then directed
to the admin switchboard.
 
J

Jerry Whittle

Do you have user level security enabled? If not, don't even bother the the
Switchboard password. Why? With the database open, press the F11 key.
Everyone can get at anything. You can disable special keys like F11; however,
even that can be bypassed unless you implement user-level-security.
 
J

John W. Vinson

I have two switchboard pages. One with options for a user and one with
options for an admin. On the main switchboard I have two selections: user and
admin. I want to be able to attach a password to the admin selection so that
when someone clicks it they will be prompted for a password and then directed
to the admin switchboard.

As Jerry says, you may find it difficult to keep snoopy people out: "locks
keep out honest folks". If someone seriously wants to bypass your security and
has a modicum of knowledge about Access they'll be able to crack it, or find
someone who can.

That said, for a $9.95 three-digit combination bicycle lock equivalent, you
can put code in the Click event of the command button that opens the admin
form:

Private Sub cmdOpenAdmin_Click()
Dim strPwd As String
strPwd = InputBox("Enter administrative password:", "Password Check")
If strPwd = "Open Sesame" Then
DoCmd.OpenForm "adminformname"
Else
MsgBox "Incorrect password"
End If
End Sub

You can make it much more elaborate, with three retries, etc. if you wish. If
the user has a MDE file they won't (easily) be able to see the Open Sesame or
whatever password you choose, but as I say, this is very lightweight security.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top