Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capture users to Access 2010 backend

Status
Not open for further replies.

hefly

Technical User
Feb 6, 2008
134
US
How do you capture the users who are logged into an Access 2010 backend?

Thanks

Hefly
 
Their machine names are stored in the locking file. Otherwise you can run code to capture and store the network login when they open the application and when they exit.

Duane
Hook'D on Access
MS Access MVP
 
This works with 07, haven't tried in 2010:

Sub ShowUserRosterMultipleUsers()
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim i, j As Long

cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=c:\Northwind.mdb"

' 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

While Not rs.EOF
Debug.Print rs.Fields(0), rs.Fields(1), _
rs.Fields(2), rs.Fields(3)
rs.MoveNext
Wend

End Sub
 
Thank you!

How do you set the data source? I changed the name of the data source to my appliction but it "reds out."

E.g. I changed "Data Source=c:\Northwind.mdb" to "Data Source=F:\ReconApp.addcb"

Hefly


 

"Provider=Microsoft.ACE.OLEDB.12.0;Data Source= F:\ReconApp.addcb;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top