Solved shutdown function (1 Viewer)

carlton

New member
Local time
Today, 23:30
Joined
Oct 30, 2018
Messages
14
Is there a function/macro I can write which will always be called when Access closes regardless of the method (except of course power failure/ windows crash).
I need to perform some specific clean up operation when the database closes regardless of whether the user presses the handy EXIT APP button.
 

bob fitz

AWF VIP
Local time
Today, 23:30
Joined
May 23, 2011
Messages
4,717
Perhaps you could create a form which is opened but hidden when the db is opened. put you cleanup code in the forms close event.
 

namliam

The Mailman - AWF VIP
Local time
Tomorrow, 00:30
Joined
Aug 11, 2003
Messages
11,696
You can use a hidden form that the user cant see or even your main menu and use the "On close" event to run your cleanup code.

Though the very need makes me wonder about the database :(
 

CJ_London

Super Moderator
Staff member
Local time
Today, 23:30
Joined
Feb 19, 2013
Messages
16,553
events are associated with forms or reports, so think the only way would be to have a hidden form and call your clean up operation in that form's close event

Edit: 3 responses at the same time :geek: at least same message in all of them....
 

missinglinq

AWF VIP
Local time
Today, 19:30
Joined
Jun 20, 2003
Messages
6,423
A true photo-finish!

All bettors should retain their tickets while the track stewards review the photos!:cool:
 

carlton

New member
Local time
Today, 23:30
Joined
Oct 30, 2018
Messages
14
You can use a hidden form that the user cant see or even your main menu and use the "On close" event to run your cleanup code.

Though the very need makes me wonder about the database :(
The database contains video attachments which must be written to the TEMP directory for displaying, this needs to be cleaned up.
 

Users who are viewing this thread

Top Bottom