I know that you can use a sub called AutoClose() in Microsoft Word that executes when the project closes. But this sub doesn't seem to work in Access. Does anyone know of an equivalent of AutoClose() for Access?
This is not well tested, but:
You might try to put your desired function in the OnClose or OnUnload event of your main form, if you have one.
Before Access quits, it must close the db and thus all forms. This should fire the last option.
BTW: If you just want to add a compact database function there:
Since Access 2k you can
-go to Options
-General tab
-check compact on close
MakeItSo
Andreas Galambos
EDP / Technical Support Specialist
Bowne Global Solutions Wuppertal, Germany
(andreas.galambos@bowneglobal.de)
HP:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.