Go Back   Access World Forums > Microsoft Access Reference > Sample Databases

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
Old 08-09-2017, 02:50 AM   #1
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 11,034
Thanks: 115
Thanked 3,019 Times in 2,746 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Updated version of David Crake's "View users logged into database"

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...80&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 ...
Attached Images
File Type: png Capture2.PNG (33.1 KB, 1876 views)
File Type: png Capture5.PNG (18.7 KB, 1820 views)
Attached Files
File Type: zip CheckCurrentUsers_v2.zip (61.3 KB, 445 views)

__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Colin (Mendip Data Systems)
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


I know that you know that we both know nothing

Last edited by isladogs; 08-09-2017 at 12:43 PM.
isladogs is offline  
The Following 3 Users Say Thank You to isladogs For This Useful Post:
MickJav (09-22-2019), Pleasure (07-29-2019), shafara7 (08-28-2017)
Old 08-28-2017, 12:11 PM   #2
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 11,034
Thanks: 115
Thanked 3,019 Times in 2,746 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Updated version of David Crake's "View users logged into database"

I've updated this in response to a request from another user in this thread:
https://www.access-programmers.co.uk...89#post1544489

The updated version (v3) can now be used with password protected databases
e.g. backend databases on a network
Attached Files
File Type: accdb CheckCurrentUsers_v3.accdb (612.0 KB, 374 views)
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Colin (Mendip Data Systems)
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


I know that you know that we both know nothing
isladogs is offline  
The Following User Says Thank You to isladogs For This Useful Post:
Angotedy (08-21-2019)
Old 07-26-2019, 02:04 AM   #3
dmorgan20
Newly Registered User
 
Join Date: Apr 2018
Posts: 39
Thanks: 5
Thanked 0 Times in 0 Posts
dmorgan20 is on a distinguished road
Re: Updated version of David Crake's "View users logged into database"

Brilliant - Works well. This raises some further questions.

I noticed the UI has a 'Disconnect User' feature - Which has not been developed, how this actually possible to do?

I also noticed that the computer name being picked up is actually the server name, making it difficult to identify who's actually connected. Is there an alternative way around this?

dmorgan20 is offline  
Old 07-27-2019, 03:50 AM   #4
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 11,034
Thanks: 115
Thanked 3,019 Times in 2,746 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Updated version of David Crake's "View users logged into database"

Hi
The two disabled buttons are features that David Crake said he was working on many years ago when he released his original version. I have to admit that I've not made any attempt to add these features and I believe you are the first person who has asked about them in all this time.
1. Its certainly possible to kick out all existing users. I do this in several apps using a table tblKickout with a Boolean field Kickout and one record. The value of that field is checked e.g. every 30 seconds. If set to true, a countdown procedure is initiated and after a set time e.g. 5 minutes, the app closes. I use this when an app needs to be closed for essential maintenance

However its not immediately obvious, at least to me, how to disconnect an individual user or why anyone would want to do so. I would welcome answers to both of those points.

2. The Send Message feature would be fairly simple to add. System tray alerts could be used when you want to message all users. Alternatively a simple messaging system (or email) could be used for individual users. Examples showing ways of alerting users can be found at https://www.access-programmers.co.uk...d.php?t=295342 and http://www.utteraccess.com/forum/ind...wtopic=1169381

I've not experienced any issues with the workstation listing as mentioned by you. What are the circumstances where this happens and which version/bitness of Access and Windows are you running?
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Colin (Mendip Data Systems)
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


I know that you know that we both know nothing

Last edited by isladogs; 07-27-2019 at 04:11 AM.
isladogs is offline  
Old 07-27-2019, 03:56 AM   #5
CJ_London
Super Moderator
 
Join Date: Feb 2013
Location: UK
Posts: 11,334
Thanks: 40
Thanked 3,670 Times in 3,538 Posts
CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light
Re: Updated version of David Crake's "View users logged into database"

just curious

Quote:
The value of that field is checked e.g. every 30 seconds. If set to true, a countdown procedure is initiated and after a set time e.g. 5 minutes, the app closes.
does this work if the user machine is in sleep mode?
__________________
CJ_London
_______________________
A little thanks goes a long way. If you have found this post useful, please tick the thanks button
CJ_London is online now  
Old 07-27-2019, 04:18 AM   #6
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 11,034
Thanks: 115
Thanked 3,019 Times in 2,746 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Updated version of David Crake's "View users logged into database"

I believe so. All users were successfully disconnected after 6 minutes or so.
However it was normally used in conjunction with an idle disconnect feature whereby the app was closed if no user activity was detected within a specified time e.g. 20 minutes

__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Colin (Mendip Data Systems)
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


I know that you know that we both know nothing
isladogs is offline  
Closed Thread

Tags
users logged into any db

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
David Crake- SAMPLE "Auto Logout Users" avenger619 Forms 23 01-19-2013 03:56 PM
View Users Currently Logged In Sample Database LadyDi Modules & VBA 14 08-04-2011 11:31 AM
Misleading error msg "missing or broken refenece to the file "MSO.DLL" version 2.4" access0808 General 7 09-25-2009 01:21 PM
View users logged into database DCrake Sample Databases 2 09-03-2008 10:53 PM




All times are GMT -8. The time now is 01:13 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World