How do I create security for the database having multiple users

G

Guest

I have a database.I need to have full permissions to 2 users and just
read/insert/ delete grants for 20 other users.The problem is that when I
create security for these 20 users and say I login with one of the ID's and
enter the data and someother user logins in with his/her ID he/she is able to
view my data.I want to create security in such a manner that the data stored
by users can be viewed only by the owner of that data and the 2users(master
logins).How can I do that.I tried with the security wizard and alloted
several permissions but then I am unable to do this task.I need a good
solution to solve this problem
 
J

Joan Wild

You need to add a field to each table to identify who 'owns' it.

In your forms, you can set the default value for the control bound to this
field to
=CurrentUser()
that will put their Access login username into the field. You would likely
want to set the visible property of this control to false.

Then you'd change the record source of your forms/reports to queries that
set a criteria under the owner field of =CurrentUser() so that only their
records appear.

For the 2 master logins, in the open event of your forms you can check the
username and change the recordsource to show all records.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top