Results 1 to 10 of 10

Thread: Bind Combo Box with Access DataBase

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2005
    Posts
    152

    Exclamation Bind Combo Box with Access DataBase

    hi all,

    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.

  2. #2
    New Member
    Join Date
    Dec 2005
    Posts
    4

    Re: Bind Combo Box with Access DataBase

    Hi,

    Which version of VB or you using?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2005
    Posts
    152

    Re: Bind Combo Box with Access DataBase

    hi Mario i use the vb 6.0
    and want to devlop the Database Connection using ADODB

    Pls help me.

    thankx ,

  4. #4
    New Member
    Join Date
    Dec 2005
    Posts
    4

    Re: Bind Combo Box with Access DataBase

    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 ?

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Nov 2005
    Posts
    152

    Re: Bind Combo Box with Access DataBase

    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

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Bind Combo Box with Access DataBase

    Quote Originally Posted by nileshhthakur2004
    hi all,

    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.
    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?

  7. #7
    Junior Member
    Join Date
    Dec 2005
    Location
    Surat,India
    Posts
    29

    Re: Bind Combo Box with Access DataBase

    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
    Virendrasinh Narendrasinh Mahida
    ----------------------------------
    There is Never a WRONG time to do the RIGHT Thing

  8. #8
    Addicted Member Quizton's Avatar
    Join Date
    Dec 2005
    Location
    VB Forums
    Posts
    209

    Re: Bind Combo Box with Access DataBase

    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
    Last edited by Quizton; Dec 29th, 2005 at 05:04 AM.

  9. #9
    Member
    Join Date
    Jan 2006
    Posts
    62

    Re: Bind Combo Box with Access DataBase

    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

  10. #10
    PowerPoster Radjesh Klauke's Avatar
    Join Date
    Dec 2005
    Location
    Sexbierum (Netherlands)
    Posts
    2,244

    Re: Bind Combo Box with Access DataBase

    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.


    If you found my post helpful, please rate it.

    Codebank Submission: FireFox Browser (Gecko) in VB.NET, Load files, (sub)folders treeview with Windows icons

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width