General information
Category:
Forms & Form designer
>>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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only