Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to keep focus on ComboBox with empty input?
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
How to keep focus on ComboBox with empty input?
Miscellaneous
Thread ID:
01157387
Message ID:
01157387
Views:
84
I have a basic data entry form which includes some combo boxes. The validation strategy for this form is to disallow invalid input, issuing an immediate error message and returning 0 from the Valid method. This is working fine for text boxes but not for combo boxes if the user tabs through the control. In that case the cbo Valid() does not fire. I have tried putting some code in the LostFocus method. That works up to a point but doesn't keep the user in the invalid field. The closest I have been able to come is to put up an error message in the cbo's LostFocus(), then check for non-empty values in the Save button handler, but I'm not pleased about combos behaving differently from other form controls. I want the knock on the wrist to be immediate and complete, not just a hint and a last minute check that chucks focus back to the offending field.

Advice?
Next
Reply
Map
View

Click here to load this message in the networking platform