cricketbird
Registered User.
- Local time
- Today, 03:51
- Joined
- Jun 17, 2013
- Messages
- 117
I have the handy Allen Browne function ShowUserRosterMultipleUsers installed in the frontend and backend of my database. When run, it tells you the computer names of the logged in users for that db.
Is there a way to run this on the backend FROM the frontend? I.e. see who is connected to the backend while looking at the frontend?
I assumed I would change the
I tried
Thank you!
Is there a way to run this on the backend FROM the frontend? I.e. see who is connected to the backend while looking at the frontend?
I assumed I would change the
Set cn = CurrentProject.Connection
to another string.I tried
debug.print CurrentProject.Connection
within the backend, and then pasted the resulting string into the cn =
statement on the frontend, but got a type mismatch error.Thank you!
Code:
Public Function ShowUserRosterMultipleUsers()
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Set cn = CurrentProject.Connection
' The user roster is exposed as a provider-specific schema rowset
' in the Jet 4.0 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
While Not rs.EOF
Debug.Print rs.Fields(0), rs.Fields(1), _
rs.Fields(2), rs.Fields(3)
rs.MoveNext
Wend
End Function