Login Form that brings back certain records according to the user login. (1 Viewer)

mcsrta

New member
Local time
Today, 16:52
Joined
Jul 24, 2007
Messages
6
I have create a login form for my users to login to my database. Once the login is successful I want the form check to open up with only that user records that is assiged to them via the empnumber field which has there assigned number.

The employee table there is an acccess level field.

When the user login I want them to open the checks form because they can only add notes. When they login I want them to be able to see their empnumber records only, no other employee records.

When admin and tech person login I want the checks admin form to open with all records available.


I have attached a small version of my database. Thank you so much.
 

Attachments

  • checktest.accdb
    960 KB · Views: 185

Pat Hartman

Super Moderator
Staff member
Local time
Today, 16:52
Joined
Feb 19, 2002
Messages
42,976
You will need a control on the login form to hold the empnumber after the user logs in. This field should be null when an admin logs in and filled otherwise. Then your queries will include a reference to the login form. Instead of closing the login form when the login is complete and you open your menu, just hide the login form so it stays open throughout the session.

Where ... AND (empnumber = Forms!login!empnumber OR Forms!login!empnumber Is Null):
 

Users who are viewing this thread

Top Bottom