Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't exit valid
Message
 
 
To
19/12/1998 15:55:48
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00169156
Message ID:
00169159
Views:
26
Chris,

Set the Cancel property of the button .T. then in your Valid do this:

if ( lastkey() = 27 )
* cancel button hit
return .t.
else
* validation code
endif

You can also look at moving from controls based validation to field level validation using the database container.

>I have a form that has text box with a valid method. If I navigate to the textbox and insert invalid data and then wish to cancel the editing using the cancel button I cannot. The valid method fires and will not let me leave the textbox. What do I need to do?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform