ComboBox question

C

Convoy

I have a combo box populated using the following:
Row source: SELECT tblEquipment.EquipmentID,
tblEquipment.EquipmentType, [Brand] & " " &
[ItemModelName] & " " & [ItemModelNumber] AS Expr1 FROM
tblEquipment ORDER BY tblEquipment.EquipmentType, [Brand]
& " " & [ItemModelName] & " " & [ItemModelNumber];

Column count:3
Column widths: 0";2";4"

I have chosen this field order because I want to sort
first by equipmentType then by Expr1. However when I
choose the item with this set up, the combobox displays
column 2 (i.e. Equipment Type) instead of the
concatenated Brand/ModelName/Model Number which is what I
would like to see in the combobox after a selection is
made. Thanks for your help.
 
D

Dirk Goldgar

Convoy said:
I have a combo box populated using the following:
Row source: SELECT tblEquipment.EquipmentID,
tblEquipment.EquipmentType, [Brand] & " " &
[ItemModelName] & " " & [ItemModelNumber] AS Expr1 FROM
tblEquipment ORDER BY tblEquipment.EquipmentType, [Brand]
& " " & [ItemModelName] & " " & [ItemModelNumber];

Column count:3
Column widths: 0";2";4"

I have chosen this field order because I want to sort
first by equipmentType then by Expr1. However when I
choose the item with this set up, the combobox displays
column 2 (i.e. Equipment Type) instead of the
concatenated Brand/ModelName/Model Number which is what I
would like to see in the combobox after a selection is
made. Thanks for your help.

The combo box will always display the first visible column; that is,
the first one with a width greater than zero. With your current
rowsource, setting ColumnWidths to 0";0";4" will display your calculated
field, but you won't be able to see the EquipmentType in the dropdown
list. You could swap the order of the selected fields around in the
rowsource SELECT statement, to have EquipmentID, your calculated field
Expr1, and then EquipmentType, and then set your ColumnWidths to
0";4";2".
 

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