Lining up multiple field entries in Combo Box

  • Thread starter Thread starter Linda Peterson
  • Start date Start date
L

Linda Peterson

Using VB6, we have numerous tables that have codes and their related
descriptions.
We would like to load them into separate combo boxes for each table. We
would like to show the user the following:
code (padded with spaces to a common length), followed by a couple of spaces
(or something else), followed by the description that relates to the code.
When we do the above, the descriptions do not line up, USUALLY. Sometimes,
the combo box looks lined up, but not very often.

Does anyone have any ideas, other than having 2 combo boxes next to each
other since the users need to see both of them when they scroll through the
combo box to determine their item to be selected.?

Thank you in advance.
 
Linda

I'm not sure I entirely visualize what you're trying to do.

If I wanted to have a combo box, on drop-down, display two fields, aligned,
I'd just determine the width for each field. Once the row is selected,
however, the combo box will only display the first non-zero-width field.

Are you saying to want to be able to see both a code and a description after
picking a code? If so, add a text box that you fill from the combo box's
..Column() property.
 
ACCESS combo boxes allow for multiple columns in the dropdown list. Why not
use a query as the combo box's Row Source and return the values in different
fields?
 
I would think that you would have to use a mono-spaced font like Courier to get
them to line up.
 
Back
Top