Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Populating combo box with a field...
Message
 
À
23/04/2000 14:49:08
Ali R. Kazmi
Ark Software Development
Islamabad, Pakistan
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00362611
Message ID:
00362638
Vues:
17
>How do I populate a combobox with an entire field, with many records, automatically.

There ared plenty examples of this available.

I go this one from the VB Help (replace list1 with combo1).
Private Sub Form_Click ()
   Dim Entry, I, Msg   ' Declare variables.
   Msg = "Choose OK to add 100 items to your list box."
   MsgBox Msg   ' Display message.
   For I = 1 To 100   ' Count from 1 to 100.
      Entry = "Entry " & I   ' Create entry.
      List1.AddItem Entry   ' Add the entry.
   Next I
   Msg = "Choose OK to remove every other entry."
   MsgBox Msg   ' Display message.
   For I = 1 To 50   ' Determine how to
      List1.RemoveItem I   ' remove every other
   Next I   ' item.
   Msg = "Choose OK to remove all items from the list box."
   MsgBox Msg   ' Display message.
   List1.Clear   ' Clear list box.
End Sub
É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