Restricting what data a user can/cannot see

  • Thread starter Thread starter Frank Timmons Jr
  • Start date Start date
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?
 
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.
 
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.
 
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 & "'"
 
Back
Top