Multiple column Combo-Box only shows 1 coluimn

H

Hughie

My multiple column combo-box in a form is based on a 10 column select query.
In form view, the combo-box only returns 1 column. How can I make it show
all 10?
 
F

fredg

My multiple column combo-box in a form is based on a 10 column select query.
In form view, the combo-box only returns 1 column. How can I make it show
all 10?

Set the combo's column count property to 10.

Then set the Column width's property to 1/2-Inch:
0.5";0.5";0.5"; .. etc .. ;0.5"
(or as wide as you want each column).

Set the List Width property to Auto.
 
H

Hughie

I used a combo-box wizard to bring in query fieldss. In that process, I set
column widths and thus the combo-box width. So the Column property has those
widths preset. I set the list width to auto and the combo box still only
shows 1 column. Need help badly as this database needs to be done tomorrow
and I think this is the last problem. Thanks.
 
R

Rick Brandt

Hughie said:
My multiple column combo-box in a form is based on a 10 column select
query. In form view, the combo-box only returns 1 column. How can I
make it show all 10?

You can make it show more than one column in the drop-list that is
displayed, but not in the control after making a selection. You can
simulate this though by having TextBoxes that display the other columns in
the ComboBox with ControlSources like...

=ComboBoxName.Column(1)
=ComboBoxName.Column(2)
etc.
 
H

Hughie

Thanks. I was heading in that direction via Access Help file. When I try
this I get #Name? returned. The Help File said to set control source to:

=Forms!Customers!CompanyName.Column(1) so I tried:

=Forms!SpartanStudentBehaviorLog!Last_FirstUC.Column(2) and it still
returned #Name?
 
R

Rick Brandt

Hughie said:
Thanks. I was heading in that direction via Access Help file. When
I try this I get #Name? returned. The Help File said to set control
source to:

=Forms!Customers!CompanyName.Column(1) so I tried:

=Forms!SpartanStudentBehaviorLog!Last_FirstUC.Column(2) and it still
returned #Name?

What is the ColumnCount property of the ComboBox? #Name normally means that
Access can't find one of the referenced objects in the expression.
 
H

Hughie

ColumnCount is set at 10. When I go to form view and click on the combo-box,
all 10 columns show.
 
P

PaulH

Hate to butt in, but I am having the same problem, kind of. I have a 5 column
drop down that displays properly and in the properties have the column count
set to 5, widths proper, and bound column set to "2". However when I select a
row, it loads column 1 into the combo box. Kind of stumped.
Thanks
Paul Hastings
 
R

Rick Brandt

Hughie said:
ColumnCount is set at 10. When I go to form view and click on the
combo-box, all 10 columns show.

If the TextBox is on the same form as the ComboBox you shouldn't need to
include the Forms! reference. Just use...

=[Last_FirstUC].Column(2)

....and see if that works.
 
H

Hughie

Sorry to say, but no.

Rick Brandt said:
Hughie said:
ColumnCount is set at 10. When I go to form view and click on the
combo-box, all 10 columns show.

If the TextBox is on the same form as the ComboBox you shouldn't need to
include the Forms! reference. Just use...

=[Last_FirstUC].Column(2)

....and see if that works.
 
H

Hughie

It works on all boxes so far. Thank you so much for sticking with this
problem. Thank you.
 
P

PaulH

So, what is the bound column? Guess my impression was that the bound column
was the column that would be inserted into the box when the row was chosen.

Paul
 
R

Rick Brandt

PaulH said:
So, what is the bound column? Guess my impression was that the bound
column was the column that would be inserted into the box when the
row was chosen.

No the bound column is the one whose Value is stored in the control (and
written to the RecordSource if the control is bound). The column you see
after making a selection is the left-most column with a non-zero column
width setting.
 
P

PaulH

"Rick Brandt" wrote:
So, the bound column is the data actually stored in the control (combo-box)
and written to the RecordSource. But it displays the left most non zero width
column.

Guess for it to display correctly the bound column should be 1 and the data
in that column the data you want stored. That makes sense.

Are you a for hire consultant? I am really a newbie to access and have a
couple of projects I would like some help with. It's the way I learn.

Thanks for your help.

Paul
 
Top