Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Populating combo box with a field...
Message
 
To
23/04/2000 14:49:08
Ali R. Kazmi
Ark Software Development
Islamabad, Pakistan
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00362611
Message ID:
00362638
Views:
18
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform