Restricting what data a user can/cannot see

F

Frank Timmons Jr

I have seen lots of discussions about securing access to tables/forms/code,
etc...but I haven't seen any context about restricting users to specific
data.

Lets say for example I have a database that includes sales information
(imported from an external source, not directly entered in this access
database) and there are multiple sales reps who access this database. I do
not want Sales Rep 1 to be able to view Sales Rep 2 data.

What is the best recomended method, or is this even possible?
 
K

Kevin Seitz

Create a field that holds the editor's name, and then set it's default value
to currentuser(). Then set the form filter to make sure the users name
equals currentuser(). Might not be perfectly secure though but it is an
idea.
 
F

Frank Timmons Jr

This particular application will be completly in read-only mode. There will
be no need for any user to add or even modify any data. It is acting as a
reporting tool for a group of sales reps.

There will be no filtering, querying, or reports created by the users. I
will take care of all that in the design of the application.
 
S

Scott McDaniel

In a properly secured application, you can filter data based on the
CurrentUser function ... assuming you have implemented User Level security.
Otherwise, CurrentUser always returns "Admin".

For example, in a form based on a query named qrySalesData, you could filter
it in the Open event:

SELECT * FROM qrySalesData WHERE strSalesRep='" & CurrentUser & "'"
 

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