Enumerate group and users : User Account « Access « VBA / Excel / Access / Word






Enumerate group and users

 

Sub EnumGroupsAndUsers()

    Dim grp As Group
    Dim usr As User
    For Each usr In DBEngine(0).Users
        Debug.Print usr.Name
        For Each grp In usr.Groups
            Debug.Print vbTab; grp.Name
        Next
    Next

End Sub

 








Related examples in the same category

1.Add a new user
2.Creating a User Account
3.Deleting a User Account
4.Listing All User Accounts
5.Retrieving the Name of the Object Owner
6.Setting User Permissions for an Object
7.Creating a User Account with SQL command
8.Changing a User Password with SQL command
9.Setting User Permissions for a Database
10.Setting User Permissions for Containers
11.Checking Permissions for a Specific Object