Lilli
05-05-2007, 11:02 AM
Does VBA have a "timer" constant that allows it to figure out the amount of time someone spent logged on?
|
View Full Version : Timer Lilli 05-05-2007, 11:02 AM Does VBA have a "timer" constant that allows it to figure out the amount of time someone spent logged on? llkhoutx 05-05-2007, 05:58 PM 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. boblarson 05-05-2007, 06:48 PM 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. llkhoutx 05-06-2007, 10:57 AM 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. Lilli 05-06-2007, 01:53 PM Thank you very much guys. Your solutions were really clever and most of all, they worked perfectly for what I needed. |