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

How do i................... 1

Status
Not open for further replies.

rickm4

MIS
Sep 7, 2000
15
US
Hi, If i download a 'Employee file" from outside of access(AS/400)into an Access db and i want people to only see their record from this file, how would i set up the log in and or password? I know i could run a query based upon the users id but i need to make sure that individuals can only see data about themselves . Thanks in advance. Rick
 
You could build a username and password table to store the information, then have a modal form that opens when you go into the database that prompts them for a user name and password. Maximize the form and disable the close button to keep them from getting to the database container. If you set the input mask to password on the text box where the password is entered, then only *'s will appear when they enter their password. When they enter this information, you can check to see if it is in the table, and if it is open the form with the data queried only for their information. Be sure to give yourself a way to get into the database container (a special password or a hidden button). You might also consider disabling the shift key if you are really worried about security, but again make sure you have a way in!!!

Good Luck!!!

Mike Rohde
rohdem@marshallengines.com
 
Rick,

You can set up Access security and require users to log in. The profile can be embedded in the shortcut for each user.

After login you can retrieve the user's profile ( CurrentUser ).

You can then set the form's recordsource property to:

"Select * from yourtablename where UserID='" & CurrentUser & "';"

i.e.

Me.RecordSource="Select * from yourtablename where UserID='" & CurrentUser & "';"

Using Access's security is much easier than setting up your own.

If you do disable the shift key and, of cousre, F11 then you can simply have a super user that gets the top menu bar.

if CurrentUser ="SysAdmin" then
Docmd.ShowToolBar "Menu Bar", acToolBarYes
Else
Docmd.ShowToolBar "Menu Bar", acToolBarNo
Endif

From here you can unhide the db container window.



Bill Paton
william.paton@ubsw.com
Check out my website !
 
Thanks for the quick responses, i will try them, thanks for your patience in me needing things spelled out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top