How to Display Data in Combo Box

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
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Leave a comment

Copyright @ Codes-47.Blogspot.Com. Powered by Blogger.