You can download an LDB viewer from the microsoft website that can tell you how many people are using your mdb and who is using it at any time
Search their site for this ... I,ve used it and its pretty helpful when trying to get people to stop using the database while you carry out some maintenance
Here's what I use to get the user/machine list:
As I review the code I just pasted in, several of the functions are from Getz's Access Developers Guide (best book on access I've ever seen) so I don't feel right posting them here but heres what they do:
dhRInstr - returns the rightmost occurrance of the character searched for.
dhTrimNull - returns the string passed up to but not including any trailing null chars.
Luther
Option Compare Database
Option Explicit
Private Type UserInfo
Computer As String * 32
SecName As String * 32
End Type
Public Function GetUsers() As String
Dim DataFile As Long
Dim sFile As String
Dim uUserInfo As UserInfo
Dim UserInfos As New Collection
Dim sTemp As String
Dim lIndex As Long
On Error GoTo ERROR_
sFile = CurrentDb.Name
sFile = Left(sFile, dhRInstr(sFile, ".")
sFile = sFile & "ldb"
DataFile = FreeFile
Open sFile For Random As DataFile Len = Len(uUserInfo)
lIndex = 1
Do While lIndex <= (LOF(DataFile) / Len(uUserInfo))
Get DataFile, lIndex, uUserInfo
uUserInfo.SecName = dhTrimNull(uUserInfo.SecName)
uUserInfo.Computer = dhTrimNull(uUserInfo.Computer)
sTemp = "User: " & Trim(uUserInfo.SecName) & _
" on Machine: " & Trim(uUserInfo.Computer) & vbCrLf
lIndex = lIndex + 1
Loop
GetUsers = sTemp
Exit_Function:
Close DataFile
Exit Function
ERROR_:
Select Case err.Number
Case Else
MsgBox "Error " & err.Number & vbCrLf & _
err.Description & vbCrLf
End Select
Resume Exit_Function
End Function
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.