Access Form_OnTimer - doesn't run during Hybernation??

I have a timer that checks for a value in a table... then if it's their, it shuts down access and kicks the users out. It works perfect, until the users machine goes to sleep or hybernates... then my "KickEmOut" utility is useless because the timer stops working?
Any Ideas?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


I'm sorry, but I'm quite certain that there is no solution. While the computer sleeps, let alone hibernates, the entire Access process is stopped. You would need some form of wake-up call from the outside.

There might be a way to prohibit sleeping or hibernating while your application is open, but this will probably be quite version-specific. Perhaps try to ask "how to prevent sleeping and/or hibernating while my application is open" in a Window TA?

Good luck!
a260148Author Commented:
I'm in a work evironment that is very security driven... so that will not be a feasible option. If we leave our desks for longer than 15 minutes... they hybernate, lock, and you have to have a pw to log back in.
>If we leave our desks for longer than 15 minutes... they hybernate, lock, and you have to have a pw to log back in.
That is not the normal way that is handled.  Normally, the desktop just locks down after a period of inactivity but software will continue running underneath.  If that were the case, your database timer would run underneath the lock.  But if the computer truely goes into hibernation or sleep, you are completely out of luck.  Hibernation is identical to turning off the computer except memory is saved to disk before hibenation and then returned after hibernation.  Standby is the same as turning off the computer except power is maintained to the memory refresh circuits to keep memory alive.  It would be very unlikely that your database would run with the computer turned off.  

You could possibly determine when the computer is going into hibernation or standby with an API call and shut down Access then.  I will look into it.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Leigh PurvisDatabase DeveloperCommented:
Not a fan of it (I know Nelson is - so shant berate it too much ;-) but might you not be able to use a Sendkeys to prevent your machine from dropping out at all?
Lure the pc into a continued sense of operation - allowing your application to continue doing its thing.

Obviously it would have to be something truly innocuous - like
SendKeys "^1"
(Asuming that ctrl + 1 doesn't ahve a specific meaning in your environment).

As I say though - not exactly jumping up and down about it as a possible solution :-)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
a260148Author Commented:
Are you saying that using the sendKeys would keep the machine from hybernating... ? I've never used the sendkey... hmmm.
What if the use hit the hybernate key on the keyboard rather than just going after non-use?
Leigh PurvisDatabase DeveloperCommented:
Well what if they kick the wall socket switch while flirting with the person in the next cubicle.
There's no allowing for User umm... nuances (shall we say).
Hey, Leigh.  I never said I was a fan of SendKeys.  I've just said it can be useful at times (unlike our president George II) if used carefully.
Leigh PurvisDatabase DeveloperCommented:
Nah - I saw you on TV at a SendKeys rally.
Waving a banner - chanting.
"Hurrah for Sendkeys!"

Ahh - knowing you perhaps you were only there for the scantily clad Sendkeys babes...
(Hey they should actually have those - and others at IT conferences and such.  You could whisper to your buddy "Wow - look at Miss DAO..." to which he would obviously reply "Nah - I prefer Miss ADO" etc etc and hilarity ensues)

(Point taken though - it's true what you say :-)
Miss DAO is hot!!  Have yous seen here with that little d that hardly covers anything?
At EE, a C grade is a failing grade (below is from
C: Because Experts' reliability are often judged by their grading records, many Experts would like the opportunity to clarify if you have questions about their solutions. If you have given the Expert(s) ample time to respond to your clarification posts and you have responded to each of their posts providing requested information; or if the answers, after clarification, lack finality or do not completely address the issue presented, then a "C" grade is an option. You also have the option here of just asking Community Support to delete the question.

Could I ask you to either request community support ( to delete the question and refund your points or up the grade? (below is from
Before you ask the Moderators to help you in this circumstance, take the time to post a message in your question stating your intention to have the question deleted or closed, and make sure you have responded to all of the Experts' comments. Then post a question in the Community Support topic area asking the Moderators to delete your question. Remember to post a link to the original question in your request. If there are no comments in the question, one of the Moderators will delete the question. If there are comments, the Moderator will post notice of your request, and will give the participants 96 hours to object. You may be required to post your reason for asking for the deletion, and objections will be taken into account.

Leigh PurvisDatabase DeveloperCommented:
And even "you can't do that" (and indeed occasionally a simple "No") is still a valid answer.

Although we might not want to hear it - doesn't make it less right.  :-)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.