>Remember me? Gosh this thread has gone a long way. Your suggestion worked great concerning checking for Lastkey() in the Valid method when the 'cancel' command button was pressed. Now, how can I stop the validations from executing when the user exits the form by pressing Close from the title bar menu (I've got the form set as closable) or clicking on the 'x' in the upper right hand corner of the form.
>
>Thanks,
I don't have a well formulated answer for you on this one... but maybe I can point you in the right direction. Start by creating a property on your form called something like letmeout. So you can change your if statement to: if lastkey() = 27 or thisform.letmeout = .t. then
Then find out which event fires first if someone clicks the X or hits close on the form. At that point, set thisform.letmeout = .t.
In the forms init method, set thisform.letmeout = .f.
Does that give you a good start?
--Todd Sherman
-Wake Up! Smell the Coffee!