Basically, what I’m trying to find is a way for MS Access (2003) to detect if the user has done a Ctrl+Alt+Del and locked their workstation. If that happens, I want the open database to shut down. Currently, I have a hidden form that runs in the background that checks for inactivity, but it’s unreliable.
Is there a way to do this in VBA, or should I do this another way (or both)?
Thanks!
You’re not going to find a reliable way to do that from within Access.
You might want to pursue more “reliable” methods of detecting idle time within the app itself. What is your current approach? Are you stuck with 2003, or could you possibly update to 2007/2010?
Maybe these?
http://www.tek-tips.com/viewthread.cfm?qid=933476
How to get the idle time in Windows XP using VBA?
Those are still timer-based, not looking at login state. The tek-tips code is VB, which may be adaptable for VBA, or may not. The SO link is VBA, and looks pretty similar, so there’s potential.