Hi:
I just can't figure this out.
I've spent a couple of hours reading the help explanation of all the ComboBox properties and some just don't make sense.
Given the following:
ITEMS.DBF (ID N(3), DESC C(20))
165 A
798 B
194 C
768 D
WITH MyCombo
.Style = 2 - Dropdown List
.RowSourceType = 6 - Fields
.RowSource = ITEMS.ID, DESC
.BoundColumn = 1 && the column containing ITEMS.ID
.ColumnWidths = 0,75 && don't want the ID visible, just the description
ENDWITH
Help says:
BoundColumn: Determines which column of a multicolumn list box or combo box is bound to the Value property of the control.
BoundColumn is 1 which is the column containing ITEMS.ID
In the third item ID = 194
Yet if I choose the third item .VALUE is 3 not 194!!!
I did a SET STEP ON to see the object in the debugger and none of it's properties had the value 194.
The only way I could get something was by setting .BoundTo = .T.
Now .VALUE is 194 but nothing shows in the combo, not just that but I can't navigate through the items using the keyboard.
When .BoundTo = .T. I can only choose an item using the mouse and even then the textbox part of the combo is empty.
Help says:
ListIndex: Specifies the index number of the selected item in a ComboBox or ListBox control.
That's ok, the number of the item selected.
But it also says:
You can return the same value by using the control’s Value property.
That is contradicting! Didn't it say that the .VALUE will have whatever is in the column identified by BoundColumn!?!?
If BoundColumn = 1 and item #3 is selected then .VALUE should have whatever is in the first column, which is 194.
Either I'm missing something simple or I really need someone to shed some light on this.
TIA
R. Davila
DBA / Network Administrator
Administracion de Fomento Comercial
Gobierno de Puerto Rico
Still waiting for FoxPro for LINUX