Hi!
Just wanted to share how I work around this problem. On my forms I usually have two boolean variables for checking the state of the form. IsLoading and IsClosing. I make use of this two variables to by pass routines/validations that may occur when the form is either loading or closing. Initially IsLoading is TRUE and is set to false as soon as the form finishes loading.
Why do I do this? Mainly because when a form loads I usually initialize some variables and objects. Some of these objects fire up events that should be fired up only when the user changes a value, but since during start up it is posible for the form to initialize these objects... certain events fire. So to by pass these I usually add a check on the first line of the event to check if the form is loading or closing. If it is... I exit the event immediately. I use the same technique when I close the form.
Got the idea?
Regards,
Martin
Shit happens!!!