Combo Boxes & Bound Columns

lscheer

Registered User.
Local time
Today, 00:29
Joined
Jan 20, 2000
Messages
185
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.
 
Look in the properties for the combo box. A little way down, you will see a Bound Column property. Set this to 2.
 
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.
 
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.
 
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
 
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.
 
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
 

Users who are viewing this thread

Back
Top Bottom