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

Identifying multiple users in Access 2000

Status
Not open for further replies.

jerryreeve

Vendor
Jan 16, 2002
2,765
0
0
US
I have one database where I have each record identified with a user name, then I am separating the 4 different users by building a different query for each user and then calling that query from the form. it is working well in that each user only gets access to the specific records that have their name in the user field. problem is that I am increasing the number of users and want to get some sort of login that I can access to identify which user is trying to look at records and then filter the rest of the records off.

setting up security looks simplest to create the users but how do you access who each user is within a query to use as a criteria on the query form?

----------------------------
'Rule 29', "The enemy of my enemy is my enemy's enemy. No more. No less."
----------------------------
JerryReeve
Communication Systems Int'l
com-sys.com

 
Some reading:
Fundamentals of Relational Database Design

The reason I'm suggesting that reference is that you're using names to differeniate records. Bad idea. How do you tell the difference between John Smith and John Smith? Your table should look like:
UserID FirstName LastName otherInfoFieldsOfPerson
where UserID is a made up key which is unique for each record.

If you search the Access forums, or look in a book, you can create a User table which contains a UserID and a password field. When someone logs on, code is used to find the UserID and Password in the table for verification then will open the specific form which would be based on a parameter query referencing the UserID to filter the records. A parameter query looks like:
Forms![FormName]![UserIDControlName]
and would be placed on the criteria line under UserID. The logon form must stay opened. You can either make it invisible or save the UserID in a global parameter if you want to close the form.
 
thanks, I'll read that.

----------------------------
'Rule 29', "The enemy of my enemy is my enemy's enemy. No more. No less."
----------------------------
JerryReeve
Communication Systems Int'l
com-sys.com

 
setting up security looks simplest to create the users but how do you access who each user is[tt]
Field: [your user field]
Criteria: =CurrentUser()[/tt]

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top