Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with bountColumn & bountTo in comboBox
Message
General information
Forum:
Visual FoxPro
Category:
ActiveVFP
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Novell 6.x
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01050677
Message ID:
01050691
Views:
9
The sorted property is not available for rowsourcetype of fields (see help file). The combobox is sorted on the key field because that is the way you have the table sorted. You could select the records into a temporary cursor in whatever order you want using the order by clause and then use that cursor as the rowsource for your combo box.

>Greetings All
>In short, I am attempting to sort a combo on the 1st column where the 1st column is not controlSource (see below). If I use the .boundColumn and .boundTo, when selecting a record for editing, the value for the record selected will not display in the combo. If I select a rec from the combo, the selected value will not display. If I don't use the .boundCol & .boundto properties, all functionality returns to the combo, but the controlSource is updated with the listIndex of the combo rather than chkFormKey, an autoincrement key value. If I set the index of the table populating the combo to the field in col 2 of the combo, I get all functionality, BUT, the combo displays in numeric key order and not the order of the col 1, a description field. Any ideas??
>vince
>
>SELECT utlChkFormat
>SET ORDER TO chkFormKey IN utlChkFormat &&chkFormat  && if set, break relation between utlChkFormat and tblInvTypes
>SELECT tblInvTypesAP
>SET ORDER TO invType IN tblInvTypesAP
>SET RELATION TO chkFormKey INTO utlChkFormat
>
>SET ORDER TO chkFormat IN utlChkFormat && if set, break relation between utlChkFormat and tblInvTypes
>WITH thisform.clsdatadesc.cbochkFormKey
>    .controlSource = "tblinvtypesap.chkFormkey"
>    .RowSourceType = 2 &&6 && fields
>    .rowsource = "utlChkFormat.chkFormat, chkFormKey" &
>    *.rowsource = "utlChkFormat.chkFormKey,chkFormat"
>    .columncount = 2
>    .columnWidths = "100,10"
>    *.boundcolumn = 2
>    *.boundto = .t.
>ENDWITH
>thisform.defaultvaluesfrm  && problems putting this in the clsFrmTbl
>GO TOP IN &gCurrentAlias
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform