Home All Groups Group Topic Archive Search About

Loop through users groups

Author
4 Oct 2007 4:28 PM
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?

Author
4 Oct 2007 6:04 PM
Kai Strang
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


Show quote
"Robin9876" wrote:

> 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?
>
>
Author
4 Oct 2007 6:05 PM
Joan Wild
Section 22 of the security FAQ
http://support.microsoft.com/?id 7793

--
Joan Wild
Microsoft Access MVP
Show quote
"Robin9876" <robin9***@hotmail.com> wrote in message news:1191515327.322228.85390@22g2000hsm.googlegroups.com...
> 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?
>

AddThis Social Bookmark Button