Current Users Logged Into Database

Gary_Mc_Mahon

Board Regular
Joined
Apr 30, 2003
Messages
87
Hi,

Can anyone help. I want to run a query which can tell me anyone currenly logged into my database using Environ("USERNAME"). Any help would be great.

Gary
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
If you are trying to find out the current user then Andrew has pointed in the right direction :)
If you are trying to find out all the users who are using a multiuser db then things get more fun :(

There is a Database here that will let you see who is using databases, this may be what you need or you may be able to find some help from it.

http://www.fabalou.com/FullPrograms/Dblauncher.asp

HTH

Peter
 
Upvote 0
Thank you both, I have come up with a solution.

I have a form which opens on start. Then I have an on open procedure which records the envoirn("username"), date time, stauts="LogIN" in a tbl_log.

I then have another procedure that runs when the database is closed which records the envoirn("username"), date time, status="logOut " in same table.

Then I run a query to return the max date of of a username in the tbl_log, and match that to the status which will tells if the username is loged in or out.

Bit long winded, but works a treat!!

Gary
 
Upvote 0

Forum statistics

Threads
1,216,071
Messages
6,128,622
Members
449,460
Latest member
jgharbawi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top