Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox Question
Message
From
15/03/2015 18:27:30
 
 
To
15/03/2015 15:31:02
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP3
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01616819
Message ID:
01616838
Views:
57
>I set BOUNDTO to true and now it works. But I don't understand.
>I don't remember ever setting that at all. In fact in the same app there is another listbox with values of DEP,WITH and the BOUNDTO is set to false, and that returns the expected result.

The reason is you have the default .Value for the list box set to 0 (numeric).

When you have .RowSourceType = 1 and the .RowSource = 50,100,200 then the latter values are character, not numeric.

If you erase the default .Value (i.e. set to None), and you select one of the values in the list you get the selected character string e.g. "50", "100" or "200", NOT the numeric equivalents. If you need numeric results you can convert via VAL() etc.

Your next question is how to force numeric values in the list. I don't know the answer, I can't recall ever having to do that.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform