Here's the (slightly modified) code I'm using:
In Access 2010, the Reference I needed to add was the Microsoft ActiveX Data Objects 2.1 Library
Code:
Sub ShowUserRosterMultipleUsers()
Dim cn As New ADODB.Connection
Dim cn2 As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim i As Long
Dim j As Long
Dim strDatabase As String
strDatabase = "C:\Northwind.accdb"
cn.Provider = "Microsoft.ACE.OLEDB.12.0"
cn.Open "Data Source=" & strDatabase
cn2.Provider = "Microsoft.ACE.OLEDB.12.0"
cn2.Open "Data Source=" & strDatabase
' The user roster is exposed as a provider-specific schema rowset
' in the Jet 4 OLE DB provider. You have to use a GUID to
' reference the schema, as provider-specific schemas are not
' listed in ADO's type library for schema rowsets
Set rs = cn.OpenSchema(adSchemaProviderSpecific, , "{947bb102-5d43-11d1-bdbf-00c04fb92675}")
'Output the list of all users in the current database.
Debug.Print rs.Fields(0).Name, "", rs.Fields(1).Name, "", rs.Fields(2).Name, rs.Fields(3).Name
Do While Not rs.EOF
Debug.Print rs.Fields(0), rs.Fields(1), rs.Fields(2), rs.Fields(3)
rs.MoveNext
Loop
End Sub
Edit: I think the cn2 ADODB Connection is just to make sure there's another "user" logged in when you run the Sub. It doesn't look like it's actually used anywhere.