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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AutoClose command

Status
Not open for further replies.

jd20005

Technical User
Nov 11, 2003
11
GB
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:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top