Setting a Password

exm206

New Member
Joined
Jun 11, 2003
Messages
19
I have an application where the user must go through a switchboard to get to each individual form or table. Many people on the network have access to this database and all its forms and tables. I want to set one specific button on the switchboard so only two specific people can access it. In other words, I only want two specific people to be able to press the button for the Payroll info and have the information come up. Is this possible using a password or maybe somehow only granting access to specific network usernames? Any help or advice is greatly appreciated. Thanks,
Eric
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Well, the cheapest way would be just to write some code behind the button:

Code:
Your_Button_On_Click()
If InputBox("Enter A Password")<> "Let Me In, Jackass" Then
Msgbox "Incorrect Password!"
Exit Sub
Else
Docmd.OpenForm, blah blah blah
End If
End Sub

And then just give the two users the correct password. Now, of course, if your database is an .mdb file, then anyone can look at your VBA code to determine the correct password. Like I said, it's the cheapest and not necessarily the best way, but I'm fortunate enough to work in a department where ignorance has been my prime security feature. Search the Forums of
http://www.access-programmers.co.uk/forums/
for a more robust solution, including grabbing the Users' Windows Login information.
 
Upvote 0

Forum statistics

Threads
1,221,567
Messages
6,160,541
Members
451,655
Latest member
rugubara

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top