Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

find out which group a user belongs to

Status
Not open for further replies.

tomlander

Programmer
Jul 10, 2002
15
0
0
CA
In VBA, can I find out what group/groups a user belongs to?

Thanks.
 
The following code will print out the groups the user "YourUserName" is assigned to.
Code:
    Dim wsp As Workspace
    Dim i As Integer

    Set wsp = DBEngine.Workspaces(0)
    
    For i = 0 To wsp.Users("YourUserName").Groups.Count - 1
        Debug.Print wsp.Users("YourUserName").Groups(i).Name
    Next i
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top