Access exit event

G

Guest

Is there a way to execute code when access exits? The form unload and close
events do not always work when the user clicks the X button.
 
D

Douglas J Steele

Since the form has to be unloaded and closed before Access shuts down, they
should always work (except in the case of the user shutting off the
machine!)

Can you give more details about what code you've got where?
 
G

Guest

The database is set to open to a switchboard. The switch board item opens
another form. A choice by the user fromthe second form oopens a thrid form.
If the user clicks the X botton to exit the unload and close events from the
first form (switchboard) do not happen.
 
D

Douglas J Steele

've never heard of this happening before The switchboard is still open?
 
G

Guest

Sorry it looks like I asessed the situation incorrectly. The unload then the
close events are happening but a public variable that I use in the unload
event has been emptied between the click of the X button and the unload event
happening.
 
D

Douglas J. Steele

Do you have error checking in your application? Global variables will get
reset if errors occur.
 

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

Top