Here we go again, something that should be simple does not work as expected and becomes increasingly frustrating.
I have a two column ComboBox populated at runtime using an sql query.
The result when I look at the values in the drop down list is of the form :-
AAAAA | 1234
AAAAA | 5678
AAAAA | 2345
BBBBB | 2356
BBBBB | 1234
CCCCC | 4567
CCCCC | 3456
When I select one of the rows, all that appears is AAAAA for example, not the second column.
What is worse, when I try to select the values using listindex, e.g. Me.ComboBox.ListIndex, I would expect the number to be the row selected -
e.g. a number from 0 to 6.
However it is not. The listindex values for each row are as follows :-
Row 0 ListIndex 0
Row 1 ListIndex 0
Row 2 ListIndex 0
Row 3 ListIndex 3
Row 4 ListIndex 3
Row 5 ListIndex 5
Row 6 ListIndex 5
Bizarre - it only seems to select the correct value when the first column changes.
I'm sure there is a simple explanation, but I can't find one yet.