Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo validation problem
Message
From
12/02/2005 08:47:08
Alan Harris-Reid
Baseline Data Services
Devon, United Kingdom
 
 
To
12/02/2005 07:32:45
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00986220
Message ID:
00986269
Views:
18
Hi Marcia, thanks for the reply

>Hmmm. This sounds like an oxymoron to me < s >. The reason for using a combo box is to limit the selections to valid choices only. So my first question would be "Why are you putting invalid choices in the list?"

Good question. In this case there are some choices in the list which should only be available depending on the values of other controls on the same page. These other values may be changed just before displaying the dropdown options, so unless I did a requery upon combo.gotfocus (which might produce a slight delay while the combo is repopulated from a SQL back-end), it is much easier in the combo.requery() to SELECT * FROM ..., then determine in the Valid() whether the option is valid. Users also prefer to be given a brief reason as to why the option is invalid, rather than not displaying it in the first place.

I still think it would be better (and consistent with other controls) if returning .F. restored the original value. One for the VFP 10 wish-list, I think.

Regards,
Alan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform