Specific Time to Log Idle Users Off

D

Douglas J. Steele

That code shows how to shut down the database if the user hasn't used it for
a specific period of time. It's not a macro that runs at a specific time:
it's intended to be running all the time the database is open.
 
V

Vylent Fyre

Yes, that is correct - I am aware of that. My problem is, my managers do not
want it run throughout the day until after everyone has left for the day,
which is generally after 6:00pm, 7:00 pm at the latest.

I wanted to know if it was possible to implement this? Once it's 7:00 pm,
it will run DetectIdleUsers? We do have quite a few people who don't shut
the database down before they leave for the day....

(Yes, I'm aware I'm ignorant in this regard... But I'm willing to learn! :) )

VF
 
D

Douglas J. Steele

What you need to do is set the form's TimerInterval property to 0 when you
don't want it to run, and to a non-zero value (the article suggests 1000)
when you do. The problem, though, is that there's no way to set that
property automatically unless you've got a timer running on the machine,
checking to see what time it is and then deciding whether or not to change
the TimerInterval property.

If you're going to have to have a timer running anyhow, you may as well just
run that code. You could have IDLEMINUTES as a variable and change its value
depending on the time of day so that it's not so aggressive during business
hours.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top