Hi
I've now completed updating & modifying David Crake's utility to view users logged into a selected database.
Changes made include:
1. It now works with ACCDB or MDB files.
2. Fixed issues monitoring databases on remote computers
3. List of users is updated automatically every 10 seconds
4. Improvements to the Lock Database feature
Info shown for each current user:
ComputerName - The computer name connected to the datafile
LoginName - (typically Admin) (aka: Access User Name)
Connected - Is the User Connected (Yes/No)
SuspectState - If Yes, the user has left the database in a "SuspectState" (possibly corrupted)
As in the original version, the utility allows you to
lock external databases by creating a textfile 'Locked.txt' in the destination database folder
If this exists, a message is displayed stating that the database is unavailable due to system maintenance
For this to work successfully:
1. COPY the module modLockedOut to the selected database
2. ADD the line 'Call LockedOut' in the Form_Load event of the database startup form
NOTE:
When I'd almost completed this update, I discovered another similar utility by
datAdrenaline in the Sample Databases area:
https://access-programmers.co.uk/forums/showthread.php?t=223434
Use whichever version you prefer ...
EDIT 09/08/2017
The original code by David Crake requires 3 non-standard VBA references - see the screenshot in post #8.
I may modify it to remove the need for those references if I spend any more time on this