Loop through users groups

  • Thread starter Thread starter Robin9876
  • Start date Start date
R

Robin9876

When a user has logged in with a username and password for an Access
database that has a workgroup security file.
In code how can you loop through all the group names that they are a
member of?
 
Try something like this:

Function TestGroups()
Dim grp As DAO.Group
With DBEngine(0).Users(CurrentUser())
For Each grp In .Groups
Debug.Print grp.Name
Next grp
End With
End Function
 
Back
Top