multi-column combo box 
Author Message
 multi-column combo box
Is anyone aware of a combobox control that can display multiple columns in
the drop-down window?  for example, I have an employee database and its key
is last name.  The user drops down the combo box and it lists multiple
entries of 'Jones'.  The only way to know which one to pick is to have the
drop-down window show a column for first name and possibly middle initial as
well.

All the comboboxes I have found only allow one column.



Tue, 06 Nov 2001 03:00:00 GMT
 multi-column combo box

Bob,
A simple but somewhat ugly way to handle this is to insert your columns as
text in the AddItem call. For example:

AddItem YourCodeValue & vbTab & YourDescriptionValue

This will produce what looks like a two column combo box with a few caveats.
First, the fixed length code value should go in the first column to help
keep your columns aligned. For example:
With the following values to add to the combo:

ID1    Name1
ID2    Long Name 2
ID3    Very Long Name 3

If you put the ID column first (fixed length) then you columns should line
up correctly. If you put the name first, then you columns will get out of
whack. Like I said this is ugly but I've used it in simple cases. Hope this
helps.

Oscar Bowyer

Quote:

>Is anyone aware of a combobox control that can display multiple columns in
>the drop-down window?  for example, I have an employee database and its key
>is last name.  The user drops down the combo box and it lists multiple
>entries of 'Jones'.  The only way to know which one to pick is to have the
>drop-down window show a column for first name and possibly middle initial
as
>well.

>All the comboboxes I have found only allow one column.



Thu, 08 Nov 2001 03:00:00 GMT
 multi-column combo box
i prepared the 2 columns data from my sql queries and then when i link my
combo box to the recordset, it shows 2 columns in the drop down list.

for eg, "Select EmpID + '     ' + EmpName as EmpInfo From EmployeeTbl"

later in my datacombo box  (assumed that you are using simple bounded data),
put the ListField property as EmpInfo.

chung


Quote:
> Is anyone aware of a combobox control that can display multiple columns in
> the drop-down window?  for example, I have an employee database and its
key
> is last name.  The user drops down the combo box and it lists multiple
> entries of 'Jones'.  The only way to know which one to pick is to have the
> drop-down window show a column for first name and possibly middle initial
as
> well.

> All the comboboxes I have found only allow one column.



Tue, 13 Nov 2001 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. multi column combo box requirement

2. Multi-Column combo boxes

3. Multi-column combo box

4. multi column combo box

5. Multi Column Combo Box Bug 3.0 & 5.0

6. Multicolumn combo box for VB5, suggestions??

7. MultiColumn Combo boxes as in access'97

8. Multicolumn Combo Box?

9. Combo box with multi columns

10. Microsoft Visual Bacic 6.0 using multi-column data bound combo boxes

11. dropdown combo, multi column (like access..combo)

12. how add columns to a combo box in vb like access combos


 
Powered by phpBB® Forum Software