Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Lost Focus Or Valid ?
Message
From
23/07/2000 07:54:59
 
 
To
23/07/2000 05:09:39
Tan Aik Jin
Aranea WebLab Sdn Bhd
Kuala Lumpur, Malaysia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00395960
Message ID:
00395963
Views:
11
Hi Tan.

>> For data validation or certain rules validation, do you code in LostFocus() or The Valid() event ? Why do you choose one over another ? Does it offers any superior functionality ? <<

The Valid Method should, IMHO, be used in order to decide whether or not the control should be allowed to lose focus. Generally speaking, if you have code that requires setting focus to some other object, it should then go in the LostFocus.

If you have validation code in the LostFocus and you want to prevent focus from leaving the object or you want to set focus to a different object, just issue a NODEFAULT after your validation code.

Marcia
Previous
Reply
Map
View

Click here to load this message in the networking platform