Groups and its users

Sniper-BoOyA-

Registered User.
Local time
Today, 15:15
Joined
Jun 15, 2010
Messages
204
Good Morning,

First of all id like to thank you guys for all the help the past couple of days.

Back to the question: About a year ago, i decided to make usergroups within Access and setup privileges for each user. Some have access to everything, some have access to just the forms to enter data.

Now i am trying to show/hide all the menu/toolbars. I got the code working, but now i would like to apply the same method.

Administrators should have all the buttons and whatever, while the normal user should have not have access to any menu what so ever.

My question is,

CurrentUser () works great to do all this for just one user, is there also a command/function which i can use to prevent certain usergroups from having access to the Menu's?
 
Got it:

CurrentUserGroup()

I do have one question though, it turns out that not all the menu's are disabled.

Heres the VBA function im using:

Code:
Public Function menuenabled()
        Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = True
Next i
End Function

Public Function menudisabled()
        Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = False
Next i
End Function

But when i log in as normal user, which is supposed to have all menu's disabled, i still get the top menu (file, edit, view, insert etc..) plus a menu bar with new,open,print etc..

Is there a way of disabling that aswell?
 
It turns out that using the CurrentUsergroup is not functioning correctly, due to the fact that some users are in more than just one group.

So ive decided to filter it by CurrentUser instead.

It works like a charm!
 

Users who are viewing this thread

Back
Top Bottom