Combo Boxes & Bound Columns (1 Viewer)

lscheer

Registered User.
Local time
Today, 15:40
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.
 

pdx_man

Just trying to help
Local time
Today, 07:40
Joined
Jan 23, 2001
Messages
1,347
Look in the properties for the combo box. A little way down, you will see a Bound Column property. Set this to 2.
 

lscheer

Registered User.
Local time
Today, 15:40
Joined
Jan 20, 2000
Messages
185
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

Just trying to help
Local time
Today, 07:40
Joined
Jan 23, 2001
Messages
1,347
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

New member
Local time
Today, 15:40
Joined
Feb 1, 2001
Messages
6
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

Super Moderator
Staff member
Local time
Today, 10:40
Joined
Feb 19, 2002
Messages
43,302
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

AWF VIP
Local time
Today, 09:40
Joined
Dec 23, 1999
Messages
619
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

Top Bottom