Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to not valid fields when reverting
Message
From
07/10/2006 06:07:09
 
 
To
06/10/2006 12:25:48
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01160114
Message ID:
01160313
Views:
5
The revert button has it's Cancel property set to .T., right? Then you can also do:
if lastkey()=27 && ESC key = Hotkey for a Cancel button.
   return .t.
endif
if !empty(this.value)
   return .f.
endif
Now you can revert.

I think about the part, that the revert will tab to the next field... if you have a revert/cancel button, the focus will be at the button afterwards, wouldn't it? You may try out return 0 instead of return .t.

I also agree with Hilmar, that validation is best done at the moment a user want's to save - for the whole record, not single fields.

Bye, Olaf.
Previous
Reply
Map
View

Click here to load this message in the networking platform