Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bypass Validation when a Cancel button is pressed.
Message
From
11/11/1999 16:27:35
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00288499
Message ID:
00290302
Views:
47
>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!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform