Table Level Security

  • Thread starter Thread starter Allan
  • Start date Start date
A

Allan

I have a databse for which I would like to limit which
records a user can access based on certain parameters. I
would like a user to log in, using a username and
password. From the user name, the user would be limited
to which records could be read / edited.

My current structure has a table of user names /
passwords, a table with cost center numbers (with a user
name linked to each) and a table with accounting data
(linking in the cost center number).

I would need to permanently access the original log in
information for use in queries throughout the user's
session.

Any ideas?? - Or is there a better approach using Access
security features?

Allan
(e-mail address removed)
 
I would use Microsoft Access to create my security.

Once logged in, I would not allow them access to the tables.

I would create a form that is based on a query. In the query paramet, I
would pass the userid and select only records for that userid. This will
allow them to only access their records.

Since they don't have access to the tables, they would not get any results
on the query. To get around this, open teh query in design view.
Right-click anywhere on the screen and select "Properties". Change the "run
permissions" to "owner's".

I'm not saying this is the only way to do what you want, but it is how I
would do it.

I would also create a table to track user's logging in and out (I think you
said you wanted that). The best way is to create a form that opens with the
database in 'hidden' mode. Insert code in the onopen and onclose events
that will log records to a table. The info should include the userid, date,
and time logged in and out.

Rick
 
Thanks Rick,

That is exactly the direction I would like to go in.
However, my stumbling point is - how to bring the user ID
into the query. More specifically - what is the variable
that would be used in setting up the criteria?

Thanks,
Allan
-----Original Message-----
I would use Microsoft Access to create my security.

Once logged in, I would not allow them access to the tables.

I would create a form that is based on a query. In the query paramet, I
would pass the userid and select only records for that userid. This will
allow them to only access their records.

Since they don't have access to the tables, they would not get any results
on the query. To get around this, open teh query in design view.
Right-click anywhere on the screen and
select "Properties". Change the "run
 
CurrentUser



Thanks Rick,

That is exactly the direction I would like to go in.
However, my stumbling point is - how to bring the user ID
into the query. More specifically - what is the variable
that would be used in setting up the criteria?

Thanks,
Allan
select "Properties". Change the "run
 
Back
Top