in VB6 we fill ComboBox Like This
Code:Private Sub Form_Load() Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=" & App.Path & "\Inventory.mdb" & ";Persist Security Info=False" Adodc1.RecordSource = "select * from Transactions" Adodc1.Refresh Dim i As Integer For i = 1 To Adodc1.Recordset.RecordCount If Len(Adodc1.Recordset.Fields("InCountity")) <> 0 Then Combo1.AddItem (Adodc1.Recordset.Fields("ProductName")) End If Adodc1.Recordset.MoveNext Next End Sub![]()
![]()
![]()
how can we do this with VB.NET




Reply With Quote