isladogs
MVP / VIP
- Local time
- Today, 20:29
- Joined
- Jan 14, 2017
- Messages
- 18,563
Following requests from 2 forum members, I have updated & modified David Crake's utility to view users logged into a selected database.
See this closed thread: https://www.access-programmers.co.uk/forums/showpost.php?p=746480&postcount=1
The original only worked with MDB files and had a few issues
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
EDIT 09/08/2017
The original code by David Crake required 3 non-standard VBA references
I have modified this removing the need for the Common Controls reference which wasn't installed with Windows 10 (and didn't work in 64-bit Access)
The updated reference list is:
NOTE:
When I'd almost completed this update, I discovered another similar utility by datAdrenaline also in the Sample Databases area:
https://access-programmers.co.uk/for...d.php?t=223434
Use whichever version you prefer ...
See this closed thread: https://www.access-programmers.co.uk/forums/showpost.php?p=746480&postcount=1
The original only worked with MDB files and had a few issues
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
EDIT 09/08/2017
The original code by David Crake required 3 non-standard VBA references
I have modified this removing the need for the Common Controls reference which wasn't installed with Windows 10 (and didn't work in 64-bit Access)
The updated reference list is:
NOTE:
When I'd almost completed this update, I discovered another similar utility by datAdrenaline also in the Sample Databases area:
https://access-programmers.co.uk/for...d.php?t=223434
Use whichever version you prefer ...
Attachments
Last edited: