have procedure run on close of database

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
 
R

Rick Brandt

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.
 
D

Douglas J. Steele

Keep a form open at all times (it can be hidden), and call your procedure
from that form's Close event.
 
Top