Solved shutdown function (1 Viewer)

carlton

New member
Local time
Today, 18:58
Joined
Oct 30, 2018
Messages
10
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, 18:58
Joined
May 23, 2011
Messages
3,836
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
Today, 19:58
Joined
Aug 11, 2003
Messages
11,552
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, 18:58
Joined
Feb 19, 2013
Messages
12,128
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, 13:58
Joined
Jun 20, 2003
Messages
6,370
A true photo-finish!

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

carlton

New member
Local time
Today, 18:58
Joined
Oct 30, 2018
Messages
10
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 (Users: 0, Guests: 1)

Top Bottom