display multiple column using a combo box in vb

yogi

Registered User.
Local time
Yesterday, 23:20
Joined
Mar 26, 2007
Messages
47
i'm trying to display on the screen 2 columns using a combo box after I made my selection. ( a list box you can display more than 1 columns)



name company contact

mr x xxx 234
mr y yyy 123



I know how to populate the combo box but how do you display more than one column after you pick or choose them?


how could i display on the screen the name and company using a combo box
 
yuo can only display 1 column
if you want to display more info, you cancreate other textboxes with formulas

=mycombo.column(x)

where the first column in a cbobox is column0, not column1

-----------
a smart trick with cboboxes is that they display the first non-zero width column

so if you have a query with columns

col1 - companyid
col2 - name & company - which is what you want
col3 - name
col4 - company
col5 - contact

and make the widths

0;0.01;2;2;2 say

then column0 (the first column) will be bound to the control but
column1 (the second column) will display as name + company, as it is non-zero width (but only 0.01)
but you wont see it in the drop down, as it is so narrow
 
using your example, could you display all column
 

Users who are viewing this thread

Back
Top Bottom