Acess 2007 User Groups

  • Thread starter Thread starter Doctor
  • Start date Start date
D

Doctor

User level security is gone in Acess 2007. That's fine with me.

But what is the best way to setup groups and limit what a user can view/run?
For instance there are forms and reports that I want only higher user groups
to view. Also, there are often tabs on a form that I want to make visible or
invisible based on the users permissions.

I can't find much on this topic in the forums or online. Right now, I am
planning to do all of this by code. Is this the best way to do this. Has
anyone done this type of model before that could point me in the right
direction?

Any help or samples would be tremendously appreciated.
 
You can create tables that holds the names of your objects (forms and
reports) and the minimum level needed to view that object. Then cancel the
Open event of the form/report if the user doesn't meet the mimimum. You can
also hide/disable the buttons on your switchboard that the user doesn't have
access to.

If you don't want to store the user names and levels in a table, an
alternative is to give each user a command line switch that indicates their
level.

Of course, none of this is secure, but it may be adequate to keep the
unknowing from the unknowable. Give the tables a name that starts with USys
so Access hides them automatically.
 
I think I understand how this will work for forms and reports. Will canceling
the open event work for subforms without interfereing with the main form
opening?
 
You can do it in a subform too. If you do this, the subform control may not
contain any subform, and so any code that uses:
Me.[Sub1].Form
will need to be replaced to see if Sub1 actually contains a SourceObject
before you try to refer to it.
 
Back
Top