• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 224
  • Last Modified:

Groups and Users in an MDB outisde the currentdb

How do I enumerate the user names in an mdw file for a database external to the one I am currrently in?
0
paulmcneil
Asked:
paulmcneil
  • 2
1 Solution
 
peter57rCommented:
Hi paulmcneil,
You can open any mdw file.  mdw files are not linked to a database file (except in our heads, where we associate one with another).
An mdw file is just an Access database so you can open it in code and if you do queries based on Msysgrouplist and msysuserlist you can find the names (only) of all users and groups.
Pete
0
 
ArjiCommented:
peter57r is right and here is a way to do it.  If you are signed in to the .mdw file you do this:

Public Sub EnumerateUsr_Grps()
               
                Set WrkSp = DBEngine.Workspaces(0)
                For Each New_User In WrkSp.Users
                    'Debug.Print New_User.Name
                    For Each GroupMem In New_User.Groups
                        'Debug.Print "        " & GroupMem.Name
                    Next
                Next

End Sub
0
 
ArjiCommented:
You can also use the same .mdw file for as many databases as you like.  Just login into any database as an administrator and join the workgroup.  In Access 2k3 it's Tools>Security>workgroup administrator
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now