Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Password Protected Form Creation 1

Status
Not open for further replies.

Kam427

Technical User
Jun 25, 2008
3
US
Currently, I am attempting to create a form (and various tables) which hold somewhat confidential data. Thus, I would like these to be viewable only to those who are qualified, and thus password protect these forms/tables. However, I would also like to leave 1 form which is accessible to all users (for them to input their own data).

So far, I've attempted various pieces of code in the onClick and onLoad events for the forms/tables I would like to password protect, yet I need a certain macro (which was not specified). I'm a relatively new at Microsoft Access, so I was wondering if I could get some assistance in password-protecting these forms/tables.
 
Thanks a lot oxicottin... I love the format of your password-protection scheme, however, I was unable to place this onto another form. How exactly should I go about inserting this?

And regarding the second reply, I have read the FAQ, but the user-level security is not really what I seek...
 
Kam, frmSwitchboard has a button that opens the frmPasswordRequired and hides the frmSwitchboard by making it visible = False but you can chang that and close that form if needed but you have to change it in a few other places as well. What I gave you is if you want certain people to access a form in this case its frmUpdateEmployees then this would either allow if the password is correct or wont if incorrect. If you want to pasword protect a button then use something like this in the buttons on click event.

Code:
Private Sub ButtonSubmit_Click()
   If Me.txtPassword = "Some Password" Then
      ' Password is correct, continue.
   Else
      MsgBox "Login Failed", vbOkOnly
      ' Password is incorrect, do not continue.
   End If
End Sub
 
Thank you very much for that...

Hopefully that ought to solve that problem... the site is also very useful..

xD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top