Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Am I losing my mind? Combobox with numeric field overflo
Message
From
21/10/2001 11:46:28
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00570884
Message ID:
00571446
Views:
25
>Hi everyone,
>
>I read the MS knowledgebase article for VFP 3.0 relative to How to Store Numeric Values that come from a Combo Box, but does this mean you can't have a ControlSource in a combobox that is tied to a numeric field? My ControlSource was m.fieldname. That makes things a bit messy.
>
>I see the solution that MS suggests in the article, but I don't like it. Is there a better way to have the values 0 thru 9 in the RowSource as values and get them to save as numeric values in the table? It's working to show the numeric field values in my table using ControlSource, but MS says don't do it that way. Confused, but working on it.

Do you use VFP 3?

In later versions (VFP 5 and later), you can use property .BoundTo. The default value (.F., I think), makes the ComboBox work like in VFP 3: return the row postiion (for a numeric value). The other value (.T., I think) will return the field value.

The problem with ComboBoxes made some VFP 3 programmers decide work with Character Keys, rather than Integers, for PK without business value. Complex functions were created to increment a number stored in a character (complex, that is, compared with replace nextnum with nextnum+1).

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform