Results 1 to 2 of 2
2003-06-13, 16:29 #1
- Join Date
- Jul 2001
- Thanked 0 Times in 0 Posts
Enable/Disable Controls based on Security Group (Access XP)
I would like to be able to enable or disable controls on a form based upon the users security group and I have not been able to find any information on how to do this, or if it is even possible.
As an example, I would like a command button on a form to be disabled if the user is in the security group ROUsers and enabled if they are in the security group PowerUsers.
Any help would be very appreciated, Thanks!
2003-06-13, 18:54 #2
- Join Date
- Mar 2002
- Thanked 28 Times in 28 Posts
Re: Enable/Disable Controls based on Security Group (Access XP)
You can get at groups, users and permissions using DAO or ADOX. To be able to uses one of these, you must set the appropriate reference in Tools | References... ("Microsoft DAO 3.6 Object Library" for DAO, and to "Microsoft ADO Ext. 2.7 for DDL and Security" for ADOX.)
For example, the ADOX library contains objects Catalog, Groups and Users. Although the online help can be wayward, it is possible to find examples of using these objects.