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

A Macro as a Before-Close Event 1

Status
Not open for further replies.

Abi1

Technical User
Jul 4, 2001
19
GB
How do you set a macro to run every time a database is closed? Is there a Beforeclose event as in Excel VB?

Help would be much appreciated

Thanks,

Abi
 
No there isn't a before close db event. The best solution I've heard of is to make a form that is hidden and opens in the DB by default (set it as the startup form). This form should then have your macro set in the before close event of that form. Because access always closes forms before exiting, you can set the code in this hidden form and it will run if someone clicks the X. Just make sure that the hidden form opens up your switchboard or default form so the users aren't left wondering what to click.

HTH Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top