hi all, :bigyello:
i am new in VB i want to bind one ComboBox with the Data which coming from the Access Table How can i do this Pls help me ,
pls send me Answer with Code also
Thanx in advance,
Regards,
Nilesh Thakur. :afrog:
Printable View
hi all, :bigyello:
i am new in VB i want to bind one ComboBox with the Data which coming from the Access Table How can i do this Pls help me ,
pls send me Answer with Code also
Thanx in advance,
Regards,
Nilesh Thakur. :afrog:
Hi,
Which version of VB or you using?
hi Mario i use the vb 6.0
and want to devlop the Database Connection using ADODB
Pls help me.
thankx ,
I am developing in VB NEt 2005 so i cann't remember exactly how it's done in VB 6. But probably you can make the connection to your database with some tools in the menu under data (i guess) and then you can set the properties of your combobox.
If not, give me a better description of your poblem, what you want to do etc.
How do you want to make the connection, by code ?
hi Mario ,
i have one table which contain the Customer and i have one DropDown on Form i want to read value from that table and bind it to Combo Box if you know pls send me code,
Thanks in advance,
reagrds,
Nilesh Thakur
If you are using a bound control, you don't need code. That is the purpose of a bound control. I'm just guessing here because I don't use bound controls, but can't you just set the datasource property of the combobox to the table in question?Quote:
Originally Posted by nileshhthakur2004
hi
u can bind it by usinf adodc control,
but insted of this u can do one thing that open recorsdset and then add related fields in combo
All you need to do is place that little databar on the form the name will default as data1 then u place your grid or dbgrid or listbox or combo on form and in the properties menu of data1 under datasource you link it to your database then select the grid your using and in it's datasource you set to data1
ohh and make sure the data1 bars recordsource is set as well in property menu, and then it will automaticaly load and display you data using no code
also you can place text boxes on form and set property datasource to data1 and then set any field you wish to display in textbox right from your table all codeless procedure
also up above you may go to project menu then add component to get more tools to play with
ps. Is how I began as well, good for a at first procedure but I soon learned that usin code is best , but hey that will come later
please rate this post if it has been helpful , good luck
hi,
in form_load write the following code.
recset.open "Select customer_name from customer_mstr",conn,adopenkeyset,adlockoptimestic
with recset.eof
combo1.additem(recset(0))
recset.movenext
wend
Hope this will help u
regards
http://www.vbforums.com/showthread.php?t=384346
and/or
http://www.vbforums.com/showthread.php?t=332598
We are just discussing how to do that.
When I have some time I'll make you a simple example.