have procedure run on close of database

  • Thread starter Thread starter AMC
  • Start date Start date
A

AMC

How can I set a procedure to run when a database is closed or when the
application exits? I cannot find the event to attach this to.

Thanks
 
AMC said:
How can I set a procedure to run when a database is closed or when the
application exits? I cannot find the event to attach this to.

That's because there isn't one.

All forms are closed before the app does so the work-around is to use the
Close event of a form that is always opened any time the app is in use. If
you already have one of these (like a switchboard) you can use that,
otherwise you can open a hidden form at Startup and use the close event of
that.
 
Keep a form open at all times (it can be hidden), and call your procedure
from that form's Close event.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top