Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multi Column combobox
Message
 
À
29/07/2002 16:46:09
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00683705
Message ID:
00683778
Vues:
23
This message has been marked as a message which has helped to the initial question of the thread.
The easiest way is to concatenate fields:
Combo3.AddItem (rs3.Fields("itemid") & " " & rs3.Fields("descrip"))
>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.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform