Multiple Groups in Access

  • Thread starter Thread starter erick-flores
  • Start date Start date
E

erick-flores

Hello all

I created an application in Access2003. This application right now have
only two groups. Admin and non-admin. Admin can see everything in the
application, non-admin can only see some of the forms and their own
information. But now I need to create some more groups. The application
is about Expense Report Interface. There are 4 Principal in the
company. Each Principal has a Manager, and each manager should be able
to ONLY see the employees under his principal. So basically this is
what I was thiniking, groups:
1. Prin1 Admin
2. Prin1 users
3. Prin2 Admin
4. Prin2 users
5. Prin3 Admin
6. Prin3 users
7. Prin4 Admin
8. Prin4 users
9. ADMIN group

I kinda have an idea of how to do this, but I wanted to see any
feedbacks from you guys. What do you think is the best way to approach
this? I am in the right directions? or maybe I need to create some
other groups?

Any ideas? Thank you in advance
 
I have a similar type of security that I use in my applications. It is a lot
of work to setup but once done the module can be reused.
Essentially you create a user table and a user access table. Every form has
a unique number which if the user has access to it is recorded in the "user
access table". On the form open event call a procedure for checking whether
the current user has access to the form. Something like :
Sub Form_Open()
If Nz(DLookup("FormNo","tbluseraccsess","tbluseraccess.user =
Currentuser()"),0) = 0 then
DoCmd.Close acForm, Me.Name
Else
End if
Conceivably, you could do the same on a per record basis by recording the
principals id against the record and basing the form on a query that pulls up
only records that the current user has access to basedon the user access
table.

Hope it helps,
Regards,
Nick.
 

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

Back
Top