Ms Jet User Roster - See who logged in database (1 Viewer)

shafara7

Registered User.
Local time
Today, 19:04
Joined
May 8, 2017
Messages
118
Hello, I wanted to see who are using my split database in the company (a lot of user). I'm trying to understand about the Microsoft Jet User Roster.
I found a thread about this here https://www.access-programmers.co.uk/forums/showthread.php?t=292292&highlight=jet+user+roster and downloaded the zip file from sneuberg.
It only shows the computer name, and even when I did not open the file, it still show my computer name so I am not really sure how that worked.

I then found another thread http://www.utteraccess.com/forum/Who-s-Logged-Who-s-Con-t1897146.html and downloaded the file.
This one looks promising because it has timestamp etc. But when I select my file, an error 3251(Object or Provider can't execute) appeared.
Can anybody tell me why the error appeared? Is it because the file is old or not compatible or something?
 

Attachments

  • WhoIsConnected_163b.zip
    66.7 KB · Views: 399

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 02:04
Joined
May 7, 2009
Messages
19,169
You did open the file when u run the function. You have to delete the first occurrence of your computer.
 

shafara7

Registered User.
Local time
Today, 19:04
Joined
May 8, 2017
Messages
118
Thank you for your replies!

ridders, I tried opening it with my Backend database, but an error occured. See the first photo. Is it because that database is encrpted with password?
And when I test it with a dummy database (not split), another error occured. See the second photo.

arnelgp, I don't understand what you mean by "occurence". What do I have to delete?
 

Attachments

  • Check Current User.PNG
    Check Current User.PNG
    76.3 KB · Views: 375
  • Check Current User 2.PNG
    Check Current User 2.PNG
    82.8 KB · Views: 371
Last edited:

isladogs

MVP / VIP
Local time
Today, 18:04
Joined
Jan 14, 2017
Messages
18,186
Hi

Answering this on my phone.
I'm away till Sunday with no access to Access.

Sounds like you are doing this the wrong way round.
You need to link my utility to the database you are trying to monitor.

Also from memory, you should connect my utility to the FE database, not the BE.
That should fix the password issue

No idea without checking about the 2nd message. I tested it on both split and unsplit DBs, local & network DBs. All worked for me.

Can you translate the error messages.

As for arnelgp's comment, I think he's referring to the fact that both of these utilities will also record your usage as you are also connected. If you look at the screenshot for my utility, I added a column called CurrentDB to try & make the point more obvious.

Hope that makes sense
 
Last edited:

shafara7

Registered User.
Local time
Today, 19:04
Joined
May 8, 2017
Messages
118
The error from the second photo is:
"Run-Time error '3251': Object or provider is not capable of performing requested operation."

Also from memory, you should connect my utility to the FE database, not the BE.
Wait, shouldn't it be, if I connect it to my FE, it will only show me?
Because everyone makes a copy of that FE. Or is your utility can see other user from my FE?
 

isladogs

MVP / VIP
Local time
Today, 18:04
Joined
Jan 14, 2017
Messages
18,186
Hi

Wait, shouldn't it be, if I connect it to my FE, it will only show me?
Because everyone makes a copy of that FE. Or is your utility can see other user from my FE?

1. Yes - it should be connected to the BE for a split database.
No idea why I said the opposite before - brain not in gear!

2. Currently it won't work with password protected databases.
I'll let you know if I fix that

The error from the second photo is:
"Run-Time error '3251': Object or provider is not capable of performing requested operation."

3. I notice from post #1 you got the same error with the other database.
Possibly something to do with your setup?

I can't replicate that error.
Can you please add breakpoints & let me know EXACTLY where it occurs.


=========================================
4. In the meantime, consider this alternative approach for monitoring & managing logged on users.
It is ideal for databases requiring users to login with a user name / password:

Store the user name, workstation, logged on time, logged off time in a table e.g. tblWhoseOn
Also have a table e.g. tblKickout with a boolean field Kickout with default value = false

Whilst a user is logged on, the value of the Kickout field is monitored, say every 30 seconds
If true, users have a specified time to finish work and close down - I allow 5 minutes

A system admin uses a 'master' program linking to all programs containing the 2 tables and can therefore monitor the login details as necessary and 'lock' one or more databases from there

Once locked, users trying to lock into a database see a screen saying 'closed for maintenance' for a few seconds before the db is closed automatically.

Once maintenance work is completed, sysadmin unlocks the db and (optionally) sends an email to all users to inform them it is available again

I have had this system in place for several years and it works perfectly.

The WhoseOn table also gives me info on logins over a period of time so patterns of usage can be tracked e.g. who / when / how long / how many times / peak times / quiet times etc

===========================================
 

isladogs

MVP / VIP
Local time
Today, 18:04
Joined
Jan 14, 2017
Messages
18,186

Attachments

  • CheckCurrentUsers_v3.accdb
    604 KB · Views: 390
Last edited:

shafara7

Registered User.
Local time
Today, 19:04
Joined
May 8, 2017
Messages
118
Certain BE db is okay, certain will execute Error 3251.
Certain FE db is okay, certain will execute Error 3251.
Certain non-split db is okay, certain will execute Error 3251.
I don't know what's wrong with my databases.

I can't point out which line that produces the error from your utility, because the Error is already trapped and I can't access the VBA code because I think the window is set to modul (I can't click anything other than that window).
But I tried to find the same error from the db on my first post,
it highlighted the code below
Code:
Set rstUserRoster = cnnDatafile.OpenSchema(-1, _
    , "{947bb102-5d43-11d1-bdbf-00c04fb92675}")

So I think it might be similar to the code from your utility.

4. In the meantime, consider this alternative approach for monitoring & managing logged on users.
It is ideal for databases requiring users to login with a user name / password:

Store the user name, workstation, logged on time, logged off time in a table e.g. tblWhoseOn
Also have a table e.g. tblKickout with a boolean field Kickout with default value = false

Whilst a user is logged on, the value of the Kickout field is monitored, say every 30 seconds
If true, users have a specified time to finish work and close down - I allow 5 minutes

A system admin uses a 'master' program linking to all programs containing the 2 tables and can therefore monitor the login details as necessary and 'lock' one or more databases from there

Once locked, users trying to lock into a database see a screen saying 'closed for maintenance' for a few seconds before the db is closed automatically.

Once maintenance work is completed, sysadmin unlocks the db and (optionally) sends an email to all users to inform them it is available again

I have had this system in place for several years and it works perfectly.

The WhoseOn table also gives me info on logins over a period of time so patterns of usage can be tracked e.g. who / when / how long / how many times / peak times / quiet times etc
If you don't mind, could you share your sample database for that log-in and kickout part?
 

shafara7

Registered User.
Local time
Today, 19:04
Joined
May 8, 2017
Messages
118
Okay I just saw your latest post.
You're a genius!
For Login Name, there is nothing else we can do about it, right? Because it is the name of the computer itself, unless the user change the name of the computer, right?
 

isladogs

MVP / VIP
Local time
Today, 18:04
Joined
Jan 14, 2017
Messages
18,186
Certain BE db is okay, certain will execute Error 3251.
Certain FE db is okay, certain will execute Error 3251.
Certain non-split db is okay, certain will execute Error 3251.
I don't know what's wrong with my databases..

It would appear the error is at 'your end'.
Try compiling your databases that trigger the error

I can't point out which line that produces the error from your utility, because the Error is already trapped and I can't access the VBA code because I think the window is set to modul (I can't click anything other than that window).
But I tried to find the same error from the db on my first post,
it highlighted the code below
Code:
Set rstUserRoster = cnnDatafile.OpenSchema(-1, _
    , "{947bb102-5d43-11d1-bdbf-00c04fb92675}")

So I think it might be similar to the code from your utility.

The schema is the same for all user-logging utilities

Version 3 allows right clicking so you should be able to add breakpoints to check the code.
Failing that, temporarily set the popup & modal properties of the form to 'No'

Let me know how you get on with version 3 re: password protected dbs

If you don't mind, could you share your sample database for that log-in and kickout part?

Its on my list of jobs to do, but it won't be for several weeks.
To make it into a standalone demo, I've got to strip out all other unrelated code which is a long job
 

isladogs

MVP / VIP
Local time
Today, 18:04
Joined
Jan 14, 2017
Messages
18,186
Okay I just saw your latest post.
You're a genius!
For Login Name, there is nothing else we can do about it, right? Because it is the name of the computer itself, unless the user change the name of the computer, right?

Posts crossed...

Thanks for compliment.

NOTE: I've coded it so you only get one attempt to enter the database password correctly

For this type of logging utility, the login name will be 'Admin' whoever is logged in. That is solved by using my alternative approach ...

Try adding the 'locking' code to your end database & see how that works as well
 
Last edited:

Rogoflap

New member
Local time
Today, 13:04
Joined
Mar 11, 2020
Messages
1
This is a great great tool. I have one additional request though. Can it work with Access files that use security workgroups. MDW files?

I could not get this to work.

It recognizes that the database needs a password, and prompts for it, but does not ask for User like when you open the file.

Thanks,

Rog
 

isladogs

MVP / VIP
Local time
Today, 18:04
Joined
Jan 14, 2017
Messages
18,186
Glad you like it. I haven't used a MDW file for several years and am not sure whether I have anything available to test.
Which version of Access are you using?

EDIT
There is a slightly newer version (3.1) available on my website http://www.mendipdatasystems.co.uk/logged-in-users/4594398123
To be honest, I uploaded it back in Oct 2018 and can't remember what additional changes were made. May be worth downloading in case it helps
 
Last edited:

Users who are viewing this thread

Top Bottom