Hi Experts,
I have a question about the calculation time problem in Access Database for Automatically close the database if the database is idle for a period of time.
How do I calaulate for hour(s)? I would like to set to if idle for 3 hours then close the database automaticaly.
Is this correct for Calculate mintue? -- > ExpiredMinutes = (ExpiredTime / 1000) / 60
here is my code in the calculation part:
'I set the timer Interval to 1000
ExpiredTime = ExpiredTime + Me.TimerInterval
ExpiredMinutes = (ExpiredTime / 1000) ' this is for 1 second
Me.txtIdleTime = ExpiredMinutes
If ExpiredMinutes >= 10 Then ' this is for 10 minutes
ExpiredTime = 0
Application.Quit acQuitSaveAll
End If
Thanks,
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.