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

Access Database Window - Way to Run Code During a CLOSE/EXIT Event?

Status
Not open for further replies.

marcus101

Programmer
Jan 21, 2003
64
CA
Hello again:

Have a bit of a strange request, more for interest than anything else.

I want to know if it is possible in any way to insert a piece of code into the VBA editor that will essentially instruct Access to do things if the user clicks on the Close button of the Database Window.

I imagine this MAY be the same as a DatabaseExit event, if such a thing exists. I'm using Access 2000.

I'm guessing if there IS a way to do this, it's probably due to using some sort of specially named Module or Sub component, but it's not a biggie, more just a curiosity, really.

Suggestions/Thoughts?

Thanks,

marcus101
Access/SQL/XML Developer
Ottawa, Canada
 
One way would be to design a tiny unbound form, with no contents other than an OnUnload event. Have your db load that form in Hidden mode when your db starts. Then when the db is shut down the hidden form's OnUnload event is triggered.

[pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top