Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can i use combo box
Message
 
À
22/09/2000 08:55:11
Basharat Ali
Gateway Computers
Sukkur, Pakistan
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00419666
Message ID:
00419746
Vues:
20
>how can i use combo box with full list of my field
>pplzzz make some line
>
>
>thanx


Try using this sub to load the combobox/listbox with the data
Public Function LoadComboList(rsMine As ADODB.Recordset, cboBox)
   With cboBox
      .Clear
      If rsMine.State = 0 Then rsMine.Open
      If Not rsMine.BOF Then rsMine.MoveFirst
      While Not rsMine.EOF
         If Not IsNull(rsMine!Nameoffieldtodisplay) Then
            .AddItem rsMine!Nameoffieldtodisplay
            .ItemData(.NewIndex) = rsMine!Nameoffield to be used as itemdata
         End If
         rsMine.MoveNext
      Wend
   End With
End Function
There are probably some changes to be made for it to suit your exact needs but it is quite useful as I use it alot.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform