Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo validation problem
Message
From
12/02/2005 07:32:45
 
 
To
11/02/2005 20:04:54
Alan Harris-Reid
Baseline Data Services
Devon, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00986220
Message ID:
00986256
Views:
16
With combo.valid(), if .F. is returned the value stays at the new (invalid) value, and I have to restore the original value with some code like this.value=this.origvalue before leaving the validation code.

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?"

Has anyone idea what may be happening here, and how to solve the problem? Any help would be appreciated.

I think you already have the solution. Add a custom property to your combo class called uOldVal, and put code like this in the gotFocus():
This.uOldVal = This.Value
Then, in the Valid, if the selection is invalid, restore uOldVal.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform