Loop through users groups

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?
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top