Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tricks using VFP 3.0 combo boxes with bound column = 2
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00196846
Message ID:
00196865
Views:
38
>>>I have a combo that has a 2 column array as it's rowsource. The first column of the array is a description of column 2. I want the description do be displayed in the combo and I want column 2 to be bound to the control source.
>>>This works in 6.0
>>>
>>>Any Suggestions?
>>>Thanks
>>
>>You may use Combo.Boundcolumn=2 to bind Combo.Value to the second column. If it's integer, you cannot use bound combo (i.e. this case controlsource should be empty).
>
>
>The following code works in 6.0, fails in 3.0b
>this is the init for the combo.....
>When 1st is selected, "A" is stored in pprollm.csign.
>*----------------------------------------------------*
>* Build array for rollup definition
>*----------------------------------------------------*
>DIMENSION thisform.arowtypes(5,2)
>thisform.arowtypes(1,1) = "Add To Rolling Balance"
>thisform.arowtypes(1,2) = "+"
>thisform.arowtypes(2,1) = "Subtract From Rolling Balance"
>thisform.arowtypes(2,2) = "-"
>tthisformis.arowtypes(3,1) = "Do Not Include Into Rolling Balance"
>thisform.arowtypes(3,2) = "O"
>thisform.arowtypes(4,1) = "Total Line"
>thisform.arowtypes(4,2) = "T"
>thisform.arowtypes(5,1) = "Blank Line"
>thisform.arowtypes(5,2) = "B"
>
>this.rowsource = "thisform.arowtypes"
>this.rowsourcetype = 5
>this.boundcolumn = 2
>this.controlsource = "pprollm.csign"
>this.requery()

One more thing, I just noticed. If you use it in Combo.Init then it's not reliable to call Thisform.Arowtypes from there. It might happen (or not, on purely accidental basis) that Thisform properties are not available yet.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform