Hello,
I was trying to retrieve the list of persons currently opened the MS-ACCESS database.
How can I check that?
I will wait for the reply.
Regards
Parminder
Hello,
I was trying to retrieve the list of persons currently opened the MS-ACCESS database.
How can I check that?
I will wait for the reply.
Regards
Parminder
Is the db split
If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
Bob Fitzpatrick
When someone opens db I have code that records this info into a Users table. The code is behind a form that opens by default.
Code:Private Sub Form_Open(Cancel As Integer) Me.tbxUser = Environ("USERNAME") If DLookup("UserID", "UserLog", "UserID='" & Me.tbxUser & "'") & "" = "" Then CurrentDb.Execute "INSERT INTO UserLog(UserID, ComputerID, LogIn) VALUES('" & Me.tbxUser & "', '" & Environ("COMPUTERNAME") & "', Now())" Else CurrentDb.Execute "UPDATE UserLog SET ComputerID='" & Environ("COMPUTERNAME") & "', LogIn=Now(), LogOut=Null WHERE UserID='" & Me.tbxUser & "'" End If End Sub Private Sub Form_Close() CurrentDb.Execute "UPDATE UserLog SET LogOut=Now() WHERE UserID='" & Me.tbxUser & "'" End Sub
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
I put the db on ethernet so that everybody can have access to the db. But now I want to retrieve the information about user who is currently using the db and I want to display the username of their computers from where they are accessing the db.
I don't know anything about Ethernet. My sample code shows pulling computer name from network.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
IF the DB is split or isn't split. you can use in run box (WindowsKey + R) "CompMgmt.msc /computer:\\<ComputerName>" to view all the open file shares for any files on the computer. This should list a number of open connections to the Access database file and associated lock files. As well as which network users has the open file handles.
Also if you have RPC perms on the network and to the PC. you could try in a command prompt
"query process /Server:<computername>"
Will list all the open processes for <computername>. which would then list "MSAccess.exe" in theory.