Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I obtain group and user membership information programmatically?

0
Posted

How can I obtain group and user membership information programmatically?

0

In Microsoft Access 2.0, only members of the Admins group can view the group membership and permissions of other users. The following functions assume that you are a member of the Admins group. This is the only way to ensure that you have sufficient permissions to run the code without error. Microsoft Access 95 and later allows all users to retrieve group membership information, provided that they are using a Microsoft Access 95 or later workgroup file rather than a Microsoft Access 2.0 workgroup file. List Users in the system: Function faq_ListUsersInSystem () Dim ws As WorkSpace Dim i As Integer Set ws = DBEngine.Workspaces(0) For i = 0 To ws.Users.count – 1 Debug.Print ws.Users(i).Name Next i End Function List Groups in System: Function faq_ListGroupsInSystem () Dim ws As WorkSpace Dim i As Integer Set ws = DBEngine.Workspaces(0) For i = 0 To ws.Groups.count – 1 Debug.Print ws.Groups(i).Name Next i End Function List Members of Group: Function faq_ListUsersOfGroup (strGroupName As St

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123