This is the basic way and a basic code on how you to Add Data on Combo Box Control of
your Vb6 program the code below is show you the static way that the data has never change
during runtime:
With Combo1
.AddItem "Adrian"
.AddItem "Panoy"
End With
The Code below show you the dynamic way because the data are fetch from your database:
Note: Make sure that your Database Connection is
properly established
Adrian="SELECT * FROM <your tableName>"
Rs.Open Adrian,Conn
Do While Not Rs.EOF
Combo1.AddItem Rs!P_Type
Rs.MoveNext
Loop
Hope this will Help
Happy Coding ^_^
The Hardest thing to Do is to Do Nothing
your Vb6 program the code below is show you the static way that the data has never change
during runtime:
With Combo1
.AddItem "Adrian"
.AddItem "Panoy"
End With
The Code below show you the dynamic way because the data are fetch from your database:
Note: Make sure that your Database Connection is
properly established
Adrian="SELECT * FROM <your tableName>"
Rs.Open Adrian,Conn
Do While Not Rs.EOF
Combo1.AddItem Rs!P_Type
Rs.MoveNext
Loop
Hope this will Help
Happy Coding ^_^
The Hardest thing to Do is to Do Nothing
Leave a comment