Show all fields in a combo box

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

Guest

Hi,
I have a table with a key and 4 fields. On a form I have a combo box which
when clicking on the drop down box displays all four fileds. When I select
the record I want only one field is displayed in the combo box. Is there a
way to show all four fields in the box after selecting a record?

Thanks in advance,
 
Hi,
I have a table with a key and 4 fields. On a form I have a combo box which
when clicking on the drop down box displays all four fileds. When I select
the record I want only one field is displayed in the combo box. Is there a
way to show all four fields in the box after selecting a record?

Thanks in advance,

No there isn't.
A Combo box will show only the first column whose width is greater
than 0 (after selection).

To show the additional columns, add 3 unbound text controls.
Set the control source to:
=ComboName.Column(n)
where n is the number of the column wanted. As combo boxes are zero
based, Column(1) is the second column.
 
not within the combo box control, no. after a selection is made from the
droplist, only the value in the left-most column, that has a ColumnWidth
greater than zero, will be displayed. to display the values from the other
three columns: add three unbound textbox controls. in the first one, set
the ControlSource property to

=[ComboBoxName].[Column](2)

make sure you include the equal (=) sign. a combo box's columns use a
zero-based index, so the first column, from left to right, is (0), the
second column is (1), the third column is (2), etc.

set the other two unbound textboxes' ControlSource as above, changing the
column index reference to refer to the appropriate column.

hth
 
Back
Top