View Full Version : Macro to run at database close


razorking
09-29-2004, 09:52 AM
I am aware of the autoexec macro to run a macro at database start, but is there a way to run a macro when a user closes a database?

Basically I have two delete queries that I would like to run in order to clear data from a couple tables at database close.

I guess I could clear the data at startup using the autoexec macro, but running the delete function at close would be better (I won't try and explain why as it's all kind of weird)

Thanks!

Rich
09-29-2004, 11:55 AM
Scrap the Macro idea, use code and the Unload Event of a hidden form

razorking
09-29-2004, 11:10 PM
Awesome, I love it!

Thanks much!

aabaza
04-20-2005, 05:37 AM
I would just like to know what you meant by scrap the macro and use the unload event. Could you please be more explicit because I am presently trying to do exactly what was explained above but am not sure how to do about it.