Info message on exiting MS Access

M

Mary Banks

I would like to have an info message appear when I quit MS
Access by clicking the 'X' button and\or the File>Exit
command.

I'm very new to this so hope this isn't a stupid question.

Thanks in advance,
Mary
 
S

SA

Mary:

Access doesn't have an event that fires when the db or application itself
closes that is easily accessable. To solve your problem though is pretty
easy. In your application, create a minor little form. In the form's
OnClose event, add code that will display your message as a message box.
Then in the autoexec macro, open that little form, but hide it (i.e.
Me.Visible = False in the form's on open event). Then when Access or your
db is closed, the On Close event of that form will fire and you'll see your
message box.

HTH
 
Top