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

Creating Session in access 2003

Status
Not open for further replies.

ishfady

Programmer
Sep 14, 2002
31
GB
Hi

I have Access2003 database sitting on window XP pro pc and have few users. They access this system same time too.

I have user details stored in same database in table.

Is there any way in access2003 to create variable for, like user name and their user role and store in a session.

So then I can used this information to control their access to any objects in the database.


Please could you advice me.


Many thank
 
If you do want to do it the way you suggest...
Use the user table that exists and attach an additional field of Security as a integer.
Use a logon form to detect who is on the system and on the opening event of the forms where you want to apply some restriction add this code:

If Me.Security < 3 then
DoCmd.OpenForm "???" etc.. etc..
Else
MsgBox " You are not cleared to use this form so sod off...."
End if

Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top