Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo Box problem
Message
From
07/07/1999 15:25:31
 
 
To
07/07/1999 13:41:41
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00238355
Message ID:
00238472
Views:
13
>>>I’d like to put a combo box on my form, have the combo box list populated from a cursor and display the associated value from the parent table. I’m not using views or relations only cursors from a select. The parent table has a key (parent.nCatKey) that relates to a child table (child.nCatKey). When a record is displayed the proper text value (child.cCatName) is display in the combo box and when a change is made the proper key is updated on the parent record.
>>>
>>>I’ve been able to do this with success if I hand enter the values into the combo box. I would imagine this is something pretty easy to do?
>>>
>>>TIA,
>>>
>>>/Chris
>>
>>Look at the recordsource and recordsourcetype properties of the combo box.
>
>Craig,
>
>I tried this:
>
>THISFORM.CodeFrame.SponsorPage.SponCatCbo.RowSource=""
>THISFORM.CodeFrame.SponsorPage.SponCatCbo.ControlSource=""
>
>THISFORM.ExeSQL("SELECT cSpCatName FROM SponCategory","Q_SponCat",1)
>
>THISFORM.CodeFrame.SponsorPage.SponCatCbo.RowSourceType=2
>THISFORM.CodeFrame.SponsorPage.SponCatCbo.RowSource="Q_SponCat"
>THISFORM.CodeFrame.SponsorPage.SponCatCbo.ControlSource="Q_SponCat.cSpCatName"
>
>THISFORM.CodeFrame.SponsorPage.SponCatCbo.Refresh
>
>It populates the combo box but I can't seem to get it to point to the value of the parent table and when I make a selection it inserts a blank value into the combo box.
>
>/Chris

Combo box values are always characters. Could this be your problem?
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform