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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Password Protect Form 3

Status
Not open for further replies.

labprof

Technical User
Jan 26, 2006
49
US
Can anyone tell me if there is a simple way to password protect a form? I have a form in my database that I only want certain technicians to have rights/access to. I have it set up now where they click on a button and the form opens for them to enter/edit the data. However I only want the senior techs to be able to get to this form. How do I set something up so that they can have a password to open the form so the other techs can't use the form.

Can this be done?
Any help would be greatly appreciated.

~~~~~ Labprof ~~~~~
 
And once you've implemented Access security (all users logon with user name password) make sure that your senior users belong to a group which can open the form, but all other users can't (except members of the Admins group perhaps and the database owner if course).

You might also want to consider prompting members of the "senior techs" group are prompted again for the password before opening the form if there in the habit of leaving the db open and it's sensitive info.

Reply after looking at the link and Access help if you're interested in the latter option.

Regards


Ian
 
Create a New command button on your switchboard. Place the following code in the On Click event. Enter your password in place of YourPassword. Then enter the name of your form where it says YourFormName.


In ON CLICK event
Dim PassWord As String
PassWord = InputBox("Enter Password")
If PassWord = "YourPassword" Then
' Open Form
DoCmd.OpenForm "YourFormName"
DoCmd.GoToRecord , , acNewRec
Else
MsgBox ("You're not authorized")
End If


That should do it.


Thomas Bailey
a/k/a TomCat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top