Combo box ?

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

Guest

I have a combo box on a sub form that displays 3 rows of data; device
company, device model, device model number.

In the underlying table (tblDevices) I want to store the key field
fldDeviceNo, which I am able to do just fine. Problem is, after choosing an
item from the list, only the row "device company" is displayed, not all three.

Is there a way of making all three rows visible after choosing an item from
the comboBox?

Thanks for your help. Rob
 
If you want to see all three columns then you need to use a listbox not a
combo box. Only one value will be displayed in the combo box after a
selection.
 
I believe that you may have columns confused with rows. That said, there are
2 ways to do what you want. You can concatenate the columns together, or you
can have empty text boxes set to the value of the columns which aren't
displayed. The first method would use a SQL statement as a rowsource like
(this is aircode):

Select DeviceNo, DeviceCompany & " - " & DeviceModel As Device From
tblDevices;

The text box control sources would look like:

=Forms!FormName!ComboBoxName.Column(1)

amd

=Forms!FormName!ComboBoxName.Column(2)

Columns 1 and 2 are actually the second and third columns, because the
column indes starts with 0.
 
Back
Top