G
Goldar
I am having trouble with a combo box, which is filled by a query to that
displays two fields (Fund # and Fund description). The fields are unbound
and I am using VBA to store the unbound fields in a table. I am using an
option box to determine which sequence to use to present the data (I use two
different queries and store one of them in the row source of the combo box,
depending on the option box value). This all works fine. The problem comes
when an item is selected. I would like to store the values both the Fund #
and the Fund value in my table with VBA. My VBA code in the combo box
AfterUpdate routine displays (and stores) the Fund # value correctly, and the
Fund description is also displayed correctly . However, the Fund description
gets stored in the table with a value of the Fund #. I store the values of
the combo box using cbo.column( "field 0 or 1", listIndex) statement, where 0
indicates that the row source query lists the Fund Description first, and 1
indicates that the row source query lists the Fund Description second.
I have tried a number of combinations of bound column=1 or =2, but although
I get different results, none seem to be correct.
I just want to display each of the two fields on my form and then write the
values to a table. Somehow, the Fund description gets written as the fund #.
Any ideas would be helpful.
Thanks
displays two fields (Fund # and Fund description). The fields are unbound
and I am using VBA to store the unbound fields in a table. I am using an
option box to determine which sequence to use to present the data (I use two
different queries and store one of them in the row source of the combo box,
depending on the option box value). This all works fine. The problem comes
when an item is selected. I would like to store the values both the Fund #
and the Fund value in my table with VBA. My VBA code in the combo box
AfterUpdate routine displays (and stores) the Fund # value correctly, and the
Fund description is also displayed correctly . However, the Fund description
gets stored in the table with a value of the Fund #. I store the values of
the combo box using cbo.column( "field 0 or 1", listIndex) statement, where 0
indicates that the row source query lists the Fund Description first, and 1
indicates that the row source query lists the Fund Description second.
I have tried a number of combinations of bound column=1 or =2, but although
I get different results, none seem to be correct.
I just want to display each of the two fields on my form and then write the
values to a table. Somehow, the Fund description gets written as the fund #.
Any ideas would be helpful.
Thanks