Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numeric data in a ListBox
Message
From
03/03/2011 13:57:49
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01502526
Message ID:
01502540
Views:
41
You can use cast(thisform.cboList.value as int) and there is no error if the value is already an int.

>I have found that when binding a listbox to a numeric value, and then later retrieving that value, it is always safest to use:
>
>lnValue=val(transform(thisform.cboList.value))
>
>as sometimes the listbox can return a numeric value, and sometimes it can return a character and I got tired of trying to remember when and what caused the difference.
Previous
Reply
Map
View

Click here to load this message in the networking platform