Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo box activate valid if tab??
Message
From
12/06/2003 20:53:11
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00799630
Message ID:
00799632
Views:
25
>I want to activate the valid clause of a combo box, even if the user tabs through the box. I want to ensure the current selection is valid and keep the user in the combo box if it is not, so 'Lost Focus' doesn't provide the same effect, any help appreciated

I think you can use LostFocus(), with NoDefault if the condition fails.

But let me suggest an alternative. There is no guarantee that the user will ever enter one particular TextBox - the user can always skip over it with the mouse. For this reason, I find it safer to postpone all validation until the record is saved. (I hope you use buffering, do you? I mean, when the record is saved with TableUpdate()).

For the end-user, all validation would be done when the user clicks on the "Save" button. If some rules fail, the user receives an error message, and the record isn't saved.

For easy maintenance, I suggest keeping all rules in a special validation table.

HTH,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform