Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numeric value from a combo box in a grid
Message
From
28/04/1998 15:57:08
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00095252
Message ID:
00095510
Views:
26
>>>>>>>I am using VFP3.0b for Windows.
>>>>>>>
>>>>>>>I have a combo box that returns a numeric value into a numeric field of a table. Not unexpectedly, the value that is stored into the field is the recno of the cursor not the bound value.
>>>>>>>
>>>>>>>Example: if 999 is the 15th value, then 15 is stored into the table.
>>>>>>>
>>>>>>>I have come across this is 2.6 and 3.0 before.
>>>>>>>
>>>>>>>How do I write the proper value into the field?
>>>>>>
>>>>>>Use unbound combo.
>>>>>
>>>>>Can't do that in VFP3.
>>>>
>>>>Nope, You can do it. Unbound combo means combo with empty ControlSource property.
>>>
>>>Sorry.
>>>
>>>When I try to change the controlsource to a variable or blank I get the following error:"Parent Object will not allow this property setting for
>>> formset1.MRSASAVE.grdTest.cHotspot.Combo1.Controlsource"
>>>
>>>Any ideas what could be causing this?
>>
>>As long as Column has controlsource you cannot reset controlsource for its control. Actually, in a case of grid it would be more appropriate to use bound combo with Char field.
>
>Ahh... Got it. Thanks Ed.

You know, I probably wasn't precise enough. Actually, you can create dummy column with empty controlsource or better add dummy field to grid.recordsource (view/cursor) and bind the column there, and add some code to combo.interactivechange event to populate real field with real value.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform