Simple password

F

Frank Situmorang

Hello,,

After I modified, I used the sample of Access sample switchboard as my menu
in opening my database. Anyone can help me in making a password by just
clicking 1 menu of this. I can make it thru Swithcboard Administrator, by
running a code on it, but I do not know how to make a code so that by
clicking 1 switchboard item, it will shows Message box asking for password.

So the code is more or less is:
If I click 1 menu Then
'Do something

DoCmd.OpenForm "frmManageChurches and Higher Organizations"
Else
MsgBox "You have entered wrong password, please be carefull, password is
case-sensitive"
'Do something else

End If
 
R

Rick Brandt

Hello,,

After I modified, I used the sample of Access sample switchboard as my
menu in opening my database. Anyone can help me in making a password by
just clicking 1 menu of this. I can make it thru Swithcboard
Administrator, by running a code on it, but I do not know how to make a
code so that by clicking 1 switchboard item, it will shows Message box
asking for password.

So the code is more or less is:
If I click 1 menu Then
'Do something

DoCmd.OpenForm "frmManageChurches and Higher Organizations"
Else
MsgBox "You have entered wrong password, please be carefull,
password is
case-sensitive"
'Do something else

End If

Put the password prompt in the Open event of the form. That way it works
regardless of when/how the form is opened.

If InputBox("Enter Password") <> "YourPassword" Then
MsgBox("Incorrect Password")
Cancel = True
End If

Of course, unless you only give users an MDE then anyone will be able to
see what the password is by looking at your code.
 

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