Switchboard passwords

  • Thread starter Thread starter Lisa
  • Start date Start date
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.
 
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.
 
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.
 
Back
Top