Link to home
Start Free TrialLog in
Avatar of PTishyn_com
PTishyn_comFlag for United States of America

asked on

Getting time since last restart in VBA of MS Access

Experts,

I'm looking for ways to retrieve time since last restart in VBA of MS Access.
If you can think of several ways to do it - please let me know.

Thank you.
Avatar of rockiroads
rockiroads
Flag of United States of America image

what do you mean by restart of vba. Are you talking about the time your access db is started or when one goes to the vba window to do coding etc
"If you can think of several ways to do it "

Even ONE way would be cool, right ?

mx
wotcha mx. PT, I would suggest a table which stores the time. Add in other attributes, say per user etc etc etc
Each time you start msaccess, you can run the Autostart macro to add in records

This way u have logged when db started. If you have or main menu/switchboard which is automatically started and db closes from that then you can control the login and logout times from here as well

when you login, u can query the db then calculate the date/time difference between that date and Now()
Avatar of PTishyn_com

ASKER

I apologize, I wasn't clear.
Time since the computer was restarted or, to be precise, when user logged on to Windows (not since Access was open).
ASKER CERTIFIED SOLUTION
Avatar of rockiroads
rockiroads
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
by the way, this is time since pc boot up
Thank you very much.