Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return .f. in valid event
Message
From
03/08/1999 10:11:39
 
 
To
03/08/1999 08:29:45
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00249103
Message ID:
00249209
Views:
19
>If your cancel button has it's cancel property set to .T., then it also set LASTKEY() to 27 when it is clicked. This menas you can code your valid event like:
>
>IF LASTKEY() <> 27 AND (SomeCondition)
>RETURN .F.
>ENDIF

Erik,

I think LASTKEY() isn't a good solution because if you try to quit the field using the mouse then LASTKEY() may be on 27, but this doens't mean you left the field using the escape key. I agree this solution works in conjunction with a cancel button, but if the user doesn't want that you have a problem ...

This is the solution that I usually use : the valid condition of individual fields always accepts an empty field. When the OK button is pressed, I check for empty fields that must be filled and refuse to continue if there are ...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform