List All Users DAO/ADO issue

  • Thread starter Thread starter Tony_VBACoder
  • Start date Start date
T

Tony_VBACoder

In Access 2002, whether I use ADO or DAO, when I am
retrieving all the users I am getting the following 2
users that I did not create and I am assuming they are
system users: Creator, Engine.

What I want to know is, are there other system users other
than those 2, that may show up?

FYI: I am populating a list box with each user. When I am
running my Loop, should I have a test for these system
users so that I don't add them to my list?

My code is below:

*** ADO Method ***
Dim cat As ADOX.Catalog
Dim usr As ADOX.User
Set cat = New ADOX.Catalog
cat.ActiveConnection = CurrentProject.Connection
For Each usr In cat.Users
Me.listUsers.AddItem usr.Name
Next
*******************

*** DAO Method ***
Dim wrkDefault As Workspace
Dim usrNew As User
Set wrkDefault = DBEngine.Workspaces(0)
With wrkDefault
For Each usrNew In .Users
Me.listUsers.AddItem usrNew.Name
Next
End With
Set wrkDefault = Nothing
*******************
 
Tony_VBACoder said:
In Access 2002, whether I use ADO or DAO, when I am
retrieving all the users I am getting the following 2
users that I did not create and I am assuming they are
system users: Creator, Engine.

What I want to know is, are there other system users other
than those 2, that may show up?

Nope, that's it.
FYI: I am populating a list box with each user. When I am
running my Loop, should I have a test for these system
users so that I don't add them to my list?

Yes, you can't do anything about/with these users' permissions/membership,
so why list them?
 
Back
Top