Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multi Column combobox
Message
De
31/07/2002 15:26:04
 
 
À
31/07/2002 15:18:29
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00683705
Message ID:
00684672
Vues:
26
Never mind... this doesn't apply to VB combobox

-Rick

>use addListItem instead of addItem e.g.:
>
>Combo3.addListItem(rs3.Fields("itemid"),recn('rs3'),1) && add in first column
>Combo3.addListItem(rs3.Fields("descript"),recn('rs3'),2) && second column
>
>-Rick
>
>>I am using the following code to populate the 1st column of a combobox. I want to be able to add a second column (descrip).
>>
>>
I = 0
>>rs3.Open "masteritems", Splash.db
>>Do While Not rs3.EOF
>>Combo3.AddItem (rs3.Fields("itemid"))
>>ar3(I) = rs3.Fields("itemid")
>>I = I + 1
>>rs3.MoveNext
>>Loop
>>
>>The above code give me the itemid only. For example, if the table had the following records:
>>
>>
itemid   descrip
>>0001     item1
>>0002     item2
>>0003     item3
>>
>>all i see in my combobox is
>>
>>0001
>>0002
>>0003
>>
>>
>>I want to see
>>
>>0001 item1
>>0002 item2
>>0003 item3
>>
>>Any help would be appreciated.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform