Display in a Combo Box

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?
 
F

fredg

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.
 
B

Brian Bastl

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
 
G

Guest

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.
 
G

Guest

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??
 
B

Brian Bastl

SS,

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

Brian
 
G

Guest

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

SS
 

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

Top