We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


Access Form_OnTimer - doesn't run during Hybernation??

a260148 asked
Medium Priority
Last Modified: 2012-06-21
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?
Watch Question


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!


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.
Leigh PurvisDatabase Developer

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 :-)

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


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 Developer

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 Developer

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 http://www.experts-exchange.com/Databases/MS_Access/help.jsp#hi73):
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 (http://www.experts-exchange.com/Community_Support/) to delete the question and refund your points or up the grade? (below is from http://www.experts-exchange.com/Databases/MS_Access/help.jsp#hi71):
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 Developer

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.  :-)
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.