auto close macro

EEK

Registered User.
Local time
Today, 13:45
Joined
Feb 2, 2006
Messages
20
Is there a way I can run a macro or module every time a database is closed, whether the user clicks File Exit or the big X in the upper right hand corner.
They';re closing the forms properly and inserting blank records into the SQL database and I need a good way to stop that by providing a custome error message instead of the ugly ODBC error.
Thanks
 
I would suggest to add a button to your main form.
In using the button wizard, select Application > Quit application.
In doing that you don't need a macro.
 
Auto Close Macro

Thank you, but I want to make sure a specific form is closed before the db closes so that a user doesn't inadvertently add a new blank record to this database. I'd like to pop up a message that says you have to update the record or escape from it before closing the db.
Any ideas?
Thank you
 

Users who are viewing this thread

Back
Top Bottom