View users logged into database MS Access 2016 (1 Viewer)

kostas

New member
Local time
Today, 22:54
Joined
Jun 26, 2009
Messages
3
Hi @isladogs,
Great work so far.
Have you implement "Disconnect User" button? How did you approach to this action? And, what if user front end application have linked table from two or more different databases?

Thank you for your time.
 

isladogs

MVP / VIP
Local time
Today, 21:54
Joined
Jan 14, 2017
Messages
18,186
This is an updated version of a utility originally written by David Crake who is sadly no longer with us. The Disconnect User and Send Message buttons were for two features that he planned to add but AFAIK he never got around to doing so.
I have to admit that I haven't looked at this again since I posted the updated version in response to several requests from forum members.

I have my own code to lock a database and kick out all users after a five minute warning. I use it when its necessary to close a database for maintenance work. However I've never really thought about how to disconnect an individual user. Is that what you were after?
 

Mick3911

Registered User.
Local time
Today, 21:54
Joined
Jul 31, 2018
Messages
40
I would be interested in the 'Send Message' options.
 
Last edited:

isladogs

MVP / VIP
Local time
Today, 21:54
Joined
Jan 14, 2017
Messages
18,186
I can't update it for a while as I'm currently unable to upload files. Mobile Internet connection only. Please remind me in a few weeks when I'm hopefully sorted
 

Dreamweaver

Well-known member
Local time
Today, 21:54
Joined
Nov 28, 2005
Messages
2,466
Hi Been trying to get this working but had no luck I keep getting errors like in image below.


 

Attachments

  • 2019-09-20.png
    2019-09-20.png
    44.9 KB · Views: 557

isladogs

MVP / VIP
Local time
Today, 21:54
Joined
Jan 14, 2017
Messages
18,186
Hmm. Not seen that error before.
Are you aware that there is a newer version of this app in sample databases?

If you still get the error, try adding break points or stepping through the code to identify which line triggers the error.
Also please try it with another Access app to see if that also fails for you
 

Dreamweaver

Well-known member
Local time
Today, 21:54
Joined
Nov 28, 2005
Messages
2,466
I'll look for the newer version the error only happens with the remote connection but will try the latest version.


thanks mick
 

JohnMichael72

Gold Supporter
Local time
Today, 14:54
Joined
Jul 25, 2019
Messages
11
Sir, I wanted to thank you for sharing your lockout and user monitoring code, extremely useful!! I do have a question that I am hoping you can assist me with. The lockout feature works well as long as the lockout text file is located in the same location as the frontend; however, my users copy the frontend to their own computer and connect to the backend, which is on a shared drive. I would like for the module to check if there is a lockout text in the backend folder. I have been trying to modify the lockedout module to do this and cannot seem to get it working. Is this something that is relatively easy to do and if so would you be able to assist?

V/R
JM
 

isladogs

MVP / VIP
Local time
Today, 21:54
Joined
Jan 14, 2017
Messages
18,186
Hi JohnMichael
I normally use a different method which works perfectly with a split database.

Create a table tblKickout in the BE with a single Boolean field Kickout and just one record. By default the value is false

Now add a hidden form in the FE bound to that table. This runs at startup and is left running continuously. As a side benefit, this ensures a persistent connection to the BE. Use a timer event (say every 30 seconds) which checks the value of the Kickout and starts a closedown procedure when it is set true. This procedure warns users the application will be closing after a specified interval (e.g. 5 minutes) to allow users to finish their current task. The time is then counted down and the application quits for any users who haven't already left.

In addition, if Kickout is true, code is used so that new users aren't able to start the app.

As a final (optional) step, code can be used to alert users by email or a popup message that the app will be closed for maintenance in X minutes. Similarly, all authorised users can be emailed when Kickout set to false after maintenance work is complete

Hope that all makes sense.
If you need more help, please start your own thread with a link back to this or the related thread in sample databases.
 

mjdemaris

Working on it...
Local time
Today, 14:54
Joined
Jul 9, 2015
Messages
424
Colin, I appreciate the work you've done on this, and I have a quick question:
Why is it necessary to run the SQL UPDATE for the Remote user code?

Ok, two quick questions:
Why is the SQL updating CurrentDB = True, when in fact the BE i am connecting to is on a server, and it is not on my machine?

(As a side note, i am getting the "Query ' ' is corrupt" error, and have tried to install Microsoft's KB listed to fix it, but I get the message that the KB does not apply to anything on my PC. Note: this is a work PC, highly managed by Corp. using ADS and such. Posting this note just in case someone has found an actual fix or work around in the SQL.)

Thanks,
Mike
 

isladogs

MVP / VIP
Local time
Today, 21:54
Joined
Jan 14, 2017
Messages
18,186
Hi
Haven't used this for a long time but will check later-probably not till this evening UK time.
In the meantime can you confirm whether are using the latest version posted at https://www.access-programmers.co.uk/forums/showthread.php?t=295174

Also which version of Access are you using? There are version specific fixes to the query is corrupt bug. See https://support.office.com/en-us/article/access-error-query-is-corrupt-fad205a5-9fd4-49f1-be83-f21636caedec
There were also many workarounds if you need to wait for someone else to apply the fix. See this lengthy thread https://www.access-programmers.co.uk/forums/showthread.php?t=307918
 
Last edited:

isladogs

MVP / VIP
Local time
Today, 21:54
Joined
Jan 14, 2017
Messages
18,186
OK just had a quick look at the code.
The utility was originally written back in 2003 or so by David Crake. All I did was make cosmetic changes and update it for use with ACCDB files. This required fixing issues with outdated references which no longer work with later versions of Access.

This uses ADO to check the 'user roster' of the selected database (or current database if none selected). It does this every 10 seconds to ensure the list is up to date. The user details are updated in the local table tblConnectedUsers.
Hope that answers your questions.

Personally I use a totally different approach to the same issue based on a Boolean 'Kickout' field in a BE table tblKickout. That together with a user inactivity idle time check is used to monitor and manage user access to my network apps. I outlined that approach in the sample databases thread linked in my previous reply.
 

asadkhan

Registered User.
Local time
Today, 21:54
Joined
Oct 26, 2019
Messages
52
It's a very good application but unfortunately it doesn't work in network based database, any advice will be much appreciated. Keep up the good work. You are helping lot of us
 

asadkhan

Registered User.
Local time
Today, 21:54
Joined
Oct 26, 2019
Messages
52

asadkhan

Registered User.
Local time
Today, 21:54
Joined
Oct 26, 2019
Messages
52
Error

It's error 3251 in shiwUserrostermultiple usersremote procedure: object provider is not capable of performing requested operation
And it's a split db with at least 15 front ends distributed in different folders but all hosted on same network drive
 

Dreamweaver

Well-known member
Local time
Today, 21:54
Joined
Nov 28, 2005
Messages
2,466
I might be wrong but that could be your problem user front ends should be on the local system not within the network I would move them as the network trafic will be high as is at least I think it would there are others who would be able to give you a better explanation.

keep safe mick
 

Users who are viewing this thread

Top Bottom