Run Query If DB Shuts Down

Learn2010

Registered User.
Local time
Today, 11:56
Joined
Sep 15, 2010
Messages
415
I have table tblLog set up to track logging on and off. All I am tracking is the date and time the user logs on and logs off. That's pretty simple to do. When logging on it appends the userid, date, and time to tblLog. When logging off, it updates the logoff date and time for the matching fields.

What I need to know is this. If a user closes the database without using the appropriate buttons within the program, such as Ctrl Alt Del, or right clicking and using the Close command, or if the power shuts off, or whatever, is there a way to get that last update query to run?

Thank you.
 
I don't see how. Those two methods pretty much take any program out of the loop.
 
Code in the unload event of a form that would be open should cover some of those. I doubt anything will work in a power outage (other than a UPS ;))
 
Sorry Allan, I type too slowly.
 
As RuralGuy and Paul has already mentioned, powercut and CTRL+ALT+DEL, are some ways that no one can control.. Unless you play with security features to disable Task manager..

However, if you want to disable the Close button of the Access window, there is an interesting thread.. Disable close button.. Again, if the user uses CTRL+ALT+DEL this will not work..

See if that gives any help.
 

Users who are viewing this thread

Back
Top Bottom