PDA

View Full Version : How to create a usergroup using vba in access 2007



wedd
09-18-2010, 01:39 PM
I am designing a database were I'd like to create a usergroup for managers to edit the database tables etc....and a usergroup for staff who are only allowed to data entry. I will like the managers to have exclusive use of a particular form which I particularly created for their use. Which queries have been designed for their sole purpose to retrieve data. I have created two separate log-in and passwords for both managers and admin staff. Based on their log-ins is it possible when the users are logged onto the database that they each have rights and restrictions to gain or not to gain access to certain forms on the database? Its important that due to the information stored on the database that the admin staff are unable to have the same privileges and gain access to certain data or make edited changes within the database as the senior managers. Based on their unique passwords and usernames can this feature be created? If so, how?

I appreciate the assitance with this interesting challenge.:friends:

Imdabaum
09-20-2010, 08:23 AM
Unless you are using Access 2007 and making .mdb files, the security/usergroup wizard has been removed. I have been told there are still ways to mimic the functionality by creating security classes and designing your own security features, but I haven't found any examples.

Might want to start out with adding a field to the users table that stores a rights level value. Maybe doing Enums as the securityTypes, then on your form load/Open subs you can check the users' securitylevel and compare it to the enum.

I'm sure for those who are serious experts beyond my reach, you could even create properities on each form that hold a security signature that could then be compared against the base value in the table. Again though I think that's beyond my level of expertise. Just know that in programming, there's usually more than one way to skin a cat.