Multiple column Combo-Box only shows 1 coluimn

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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.
 
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.
 
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.
 
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?
 
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.
 
ColumnCount is set at 10. When I go to form view and click on the combo-box,
all 10 columns show.
 
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
 
PaulH said:
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.

That is what a ComboBox does. Additional columns are for "show only". A
ComboBox can only "hold" the value of a single column and only "show" the
value from a single column. Those two columns can be different however.
 
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.
 
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.
 
Hughie said:
Sorry to say, but no.

If you still get #Name that suggests that you aren't spelling the name of
the control properly. It must be the name of the *control* not of the field
the control is bound to.
 
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
 
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.
 
"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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top