Leave event when application closes?

FalconDEW

Freshman
Joined
Sep 18, 2003
Messages
42
Is it possible to STOP a field from running its leave event sub when the user exits the program?

Currently when I am on a field, and quit my app, the leave sub still tries to run. :(

-Falcon
 
Are you talking about a textbox ?

Because I have just tried it, the leave event does not fire when i click on X ....
 
Yeah...

Yeah - I'm talking about a textbox.

I have code that checks validates the content entered into the textbox on it's 'leave' event. I also have code that runs in the event of the form closing that checks to see if the user has saved their data, and if not - prompts them for what to do. Pretty typical stuff... but it seems like it works as such:

* Enter content into textbox that will fail the validation code set in the 'leave' sub

* Close the program

* Form close event code informs the user they haven't saved

* After declining to save data - a message box appears from the leave event saying that the data entered was not valid.

* Application closes

Hmmm... maybe it's just something in my Form Close event? It's very simple though - I just have an if statement followed by some message boxes. Maybe I'll throw an "application.exit" at the end of my form close sub and see what happens.

-Falcon
 
Back
Top