How to make it so users see only certain records in a database

D

dahinda1612

Hello,

I have a database that is used by the managers of several departments of a
company. The database stores information about the performance of the
employees in each department. I have a query that computes averages from
information about each employee entered by each manager. The managers enter
the data into a form with a query called qryComputeAppraisal as its record
source. To keep data integrity, I have a table called Employees with the
employee names. A combo box in the form uses this table as its record source.
The employee name when entered is then put into the employee in
qryComputeAppraisal. I want the managers to see only the employees within
their department. I found a function that pulls in the login ID of whoever is
logged at the time. I use this login ID in the record source of the combo box
to show only those emplloyees that are in the manager's department. This
works fine when the manager is entering data. When a manager uses Find to
find a record however, he or she is still able to pull up any record,
including those from other departments. Is there a way to hide all employees
from outside the department of the manager currently logged in? Am I going
about this the right way? Any help is greatly appreciated!
 
R

ruralguy via AccessMonster.com

You did not mention which version of Access you are using. Have you looked at
ULS - User Level Security?
 
J

Jeff Boyce

If you create a new mechanism (i.e., a Search screen) for finding
information, you can control what gets displayed.

If you use Access' built in Find function, you get what Access does.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
D

Dirk Goldgar

dahinda1612 said:
Hello,

I have a database that is used by the managers of several departments of a
company. The database stores information about the performance of the
employees in each department. I have a query that computes averages from
information about each employee entered by each manager. The managers
enter
the data into a form with a query called qryComputeAppraisal as its record
source. To keep data integrity, I have a table called Employees with the
employee names. A combo box in the form uses this table as its record
source.
The employee name when entered is then put into the employee in
qryComputeAppraisal. I want the managers to see only the employees within
their department. I found a function that pulls in the login ID of whoever
is
logged at the time. I use this login ID in the record source of the combo
box
to show only those emplloyees that are in the manager's department. This
works fine when the manager is entering data. When a manager uses Find to
find a record however, he or she is still able to pull up any record,
including those from other departments. Is there a way to hide all
employees
from outside the department of the manager currently logged in? Am I going
about this the right way? Any help is greatly appreciated!


When the manager logs in, record the manager's ID (and maybe department) in
a table. You may already be doing this. Create queries that only return
employees (or other data) for the department that corresponds to the
logged-in manager. Base all other queries, and the forms or reports based
on them, on these manager-restricted queries.
 
A

Arvin Meyer MVP

The others hinted (fairly well) about what to do. I'll be a bit more
specific. You need to build custom toolbars and disallow the Access ones.
You also need to disable any keys used for finding (like Ctrl + F and Ctrl +
H). I'd make the front-end into and MDE to keep anyone from making changes,
and hide the database window, disabling the ByPassKey (Shift) and (F11) so
that there's no way that users can get to the database window to create a
query. User Level Security can also help.
 

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

Similar Threads


Top