See more than 1 field in a Combobox

N

NNS2007

Sorry if this is a stupid question. I've set my Combobox to 3 columns,
0";1.4";1.4", and is bound to column 1. When I click on the dropdown arrow I
see 2 columns. When I select the row I want, it only displays the value in
the first column. I want to be able to see both values in the combobox. Is
this possible? Thanks for your help!
 
D

Dale Fye

It is only possible to see one column in a combo box when it is not dropped
down. When it is dropped down, you can see any columns that are visible
based on the width of the control (I occassionally reset the width in the got
focus and lost focus events to make more info visible).

You can work around this by displaying unbound text boxes to the right of
the combo box, and in the AfterUpdated event of the combo, filling these text
boxes with the values from the non-visible columns of the combo box.

HTH
Dale
 
V

vbasean

Sorry if this is a stupid question. I've set my Combobox to 3 columns,
0";1.4";1.4", and is bound to column 1. When I click on the dropdown arrowI
see 2 columns. When I select the row I want, it only displays the value in
the first column. I want to be able to see both values in the combobox. Is
this possible? Thanks for your help!

from the rowsource open the query builder

instead of having two fields, concatenate the two fields

Field1 (leave as is, it's your bound source)
Field2 = FieldName2 & " - " & FieldName3 As Description (or whatever
you want the column named)
 
F

fredg

Sorry if this is a stupid question. I've set my Combobox to 3 columns,
0";1.4";1.4", and is bound to column 1. When I click on the dropdown arrow I
see 2 columns. When I select the row I want, it only displays the value in
the first column. I want to be able to see both values in the combobox. Is
this possible? Thanks for your help!

No. A combo box (after a selection has been made) will only show the
first column whose width is greater than 0".

What you can do is add 2 unbound text controls to your form.
Set the control source of one to:
=[ComboName].Column(1)

Set the other control source to:
=[ComboName].Column(2)

Since Combo Boxes are Zero based, Column(1) is the 2nd column.
Column(2) is the 3rd column.
 
N

NNS2007

My Thanks! to Dale Fye and vbsean for thier very prompt responses. I'm using
vbasean's solution for this project but I can use Dale's in others. I can't
thank you enough fo rthe help. What a great community!

NNS2007
 

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