Display in a Combo Box

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

Guest

I have a combo box that has 3 columns in it. The first column I have set to
0" width, the 2nd is 2", and the 3rd is 1.5". It is bound to column 1 since
that is the record ID#. I am trying to display column 2 & 3 after a choice is
made. How come it only shows column 2 after a selection? When you use the
drop down you can see both columns but after the selection is made only
column 2 is visible. Why is that?
 
I have a combo box that has 3 columns in it. The first column I have set to
0" width, the 2nd is 2", and the 3rd is 1.5". It is bound to column 1 since
that is the record ID#. I am trying to display column 2 & 3 after a choice is
made. How come it only shows column 2 after a selection? When you use the
drop down you can see both columns but after the selection is made only
column 2 is visible. Why is that?

Because that's the way a combo box works.
After you select a row, it will display the first row with a width
greater than 0.

Add an unbound text control to your form.
Set it's control source to:
=[ComboName].Column(2)
to display the 3rd column.
 
SS,

In order to display the values in the second and third column, you'll need
to concatenate the two values as one field in your SQL.

Ex:
SELECT T.PersonID, T.LastName & ", " & T.FirstName
FROM tblPersons T;

Brian
 
I figured that was the answer but I wanted to ask anyways. Setting up the
unbound text box was my second option. Thanks for confirming things for me!

fredg said:
I have a combo box that has 3 columns in it. The first column I have set to
0" width, the 2nd is 2", and the 3rd is 1.5". It is bound to column 1 since
that is the record ID#. I am trying to display column 2 & 3 after a choice is
made. How come it only shows column 2 after a selection? When you use the
drop down you can see both columns but after the selection is made only
column 2 is visible. Why is that?

Because that's the way a combo box works.
After you select a row, it will display the first row with a width
greater than 0.

Add an unbound text control to your form.
Set it's control source to:
=[ComboName].Column(2)
to display the 3rd column.
 
Brian,
That's a good idea but if I do that I can't get the two columns to line up
like they were in two columns. Unless you know how to do that??
 
SS,

no, sorry I don't. If alignment is important, then the suggestion by fredg
would seem more appropriate.

Brian
 
I appreciate your input but I think I'll have to go with fredg's suggestion.
But thanks for trying.

SS
 
Back
Top