Only one column shows in 2 column combo

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

Guest

Using Office 2003 and Windows XP;

I have a combo box on a form that is set for 2 columns. IT is bound using
the following in the Row Source:

SELECT tblSourceCategory.Source_Category_ID,
tblSourceCategory.Source_Category FROM tblSourceCategory ORDER BY
tblSourceCategory.Source_Category;

When you open the drop down it displays both columns, but when an item is
selected only the first column appears. How can I get both columns to show?

Thanks much in advance.
 
XP said:
Using Office 2003 and Windows XP;

I have a combo box on a form that is set for 2 columns. IT is bound
using the following in the Row Source:

SELECT tblSourceCategory.Source_Category_ID,
tblSourceCategory.Source_Category FROM tblSourceCategory ORDER BY
tblSourceCategory.Source_Category;

When you open the drop down it displays both columns, but when an
item is selected only the first column appears. How can I get both
columns to show?

Thanks much in advance.

You can't. ComboBoxes only show the left-most column with a non-zero width when
they are not dropped down. You can place an unbound TextBox near the ComboBox
and have it display the other column with a ControlSource expression like...

=ComboBoxName.Column(1)

(column numbers start at zero)
 
Hi,

Thanks for your reply; can it be done in columns using VBA? --- Or would
that wind up being a simple contanenation?

Thanks again for your reply...
 
XP said:
Hi,

Thanks for your reply; can it be done in columns using VBA? --- Or
would that wind up being a simple contanenation?

Yes you could have the visible column be based on a concatenation of the two
columns you want to see. That would just be a modification to the RowSource
query though. No VBA involved.
 
Back
Top