Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

an equivelant to VB6 queryUnload event?

Status
Not open for further replies.

belovedcej

Programmer
Nov 16, 2005
358
US
Is there an event in Access that will run even if the program is abnormally shut down? Like in a power outage or a CTRL-ALT-DELETE set up? A VB programmer told me about the queryUnload event, but I don't see that in VBA
 
Thanks for the quick response. Are you refering to the Quit option in a macro? That simply shuts the program down.

I have a routine that needs to run with the application is shut down, and I have taken care of that - unless something happens to shut things down abnormally. If Access is shut down with CTRL-ALT-DEL, the unload event of a form does not trigger - so I know that following events (like form close) will not. I'm looking for some kind of event that will handle things when a form closes - even if it never makes it as far as the unload event.

Just had a thought - I wonder if deactivate will work. I'll check it out and let you know.
 
Neither deactive or lost focus works.

Any other ideas?
 
I realized this on the way home yesterday (of course): if the power goes off, NOTHING will run.

< M!ke >
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top