lscheer
02-07-2001, 10:19 AM
I am trying to have a combo box in my form that, when the arrow is clicked, displays two columns from a query, but fills in the data only from the second column. I can make it work if I hide the first column (column width =0 and bound column is #2), but I need to have both columns displayed (and only data from column 2 displayed in the actual field upon selection from the combo box). Any help would be great. Thanks.
pdx_man
02-07-2001, 10:36 AM
Look in the properties for the combo box. A little way down, you will see a Bound Column property. Set this to 2.
lscheer
02-07-2001, 11:35 AM
Thanks pdx_man,
But I've tried that. I had originally set the combo box to display 2 columns, with 1" and 3" widths, respectively, with the bound column property set to 2, and it still fills in the box with the value from the first column.
pdx_man
02-07-2001, 12:38 PM
check your underlying query and make sure that there are only two fields there. Otherwise, I'm stumpted. Should work. You might want to try to re-build from scratch. Access has been known to sneeze.
ywcai
02-12-2001, 12:40 PM
I tried to do the same but got an error message said: Control can't be edited, it bound to autonumber field...
Any help?
Thanks.
ywcai
Pat Hartman
02-12-2001, 03:35 PM
The combobox "at rest" will show the first visible column. So, if you want column2 to show when a value is selected for the combobox but the box is not currently dropped down, swap the column order in the query. And don't forget to change the bound property to refer to the correct column number.
R. Hicks
02-12-2001, 03:54 PM
You could also concatenate the 2 columns together seperated by a comma or whatever, in column 3, then hide the first 2 columns by setting their widths to 0". Set the bound column to the correct column you need. This will show the values of 1 & 2 together as 1 in the dropdown and in the combobox after the selection.
HTH
RDH