Timer

Lilli

Registered User.
Local time
Today, 07:06
Joined
Mar 21, 2007
Messages
21
Does VBA have a "timer" constant that allows it to figure out the amount of time someone spent logged on?
 
Only indirectly. Grab the user login name and time stamp it in a table. Time stamp when they log out. The problem is they won't always logout properly and when they login the next time, they'll appear to be logged in already.

There's no simple solution.
 
There's no simple solution.
Actually, there is a simple solution. I use it all of the time. I have a log table that stores the username, login date/time and logout date/time. I have a hidden form that opens when you open the database and it writes the username and login date/time. Then, when the user closes the database the Unload event of the hidden form writes the logout date/time for the current record they have open.
 
boblarson's post is what I suggested. However, I also posted that abnotmal mdb termination whether a result of program crash, task manager termination, or otherwise won't log a user out. I often link to the same BE with multiple FEs. Merely using login name isn't sufficient either. It's not as simple as bob... suggests.
 
Thank you very much guys.

Your solutions were really clever and most of all, they worked perfectly for

what I needed.
 

Users who are viewing this thread

Back
Top Bottom