Take data from column table and list in a combo box......

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • redskycorp
    New Member
    • Jul 2007
    • 29

    Take data from column table and list in a combo box......

    How do i take data from a table column example Customer_Name and list it in a combo box in vb6 ?
  • fplesco
    New Member
    • Jul 2007
    • 82

    #2
    Originally posted by redskycorp
    How do i take data from a table column example Customer_Name and list it in a combo box in vb6 ?
    My assumptions are,
    1. You are already connected with the database.
    2. Rs recordset is available at this point.

    All you need is check if there exist at least a record in the recordset Rs

    Code:
    cboCustomerName.Clear
    if not rs.eof then
       do until rs.eof 
            cboCustomerName.addItem Rs!Customer_Name
            rs.movenext
       loop
    end if

    Comment

    • redskycorp
      New Member
      • Jul 2007
      • 29

      #3
      Thanks man ! It works fine......

      Comment

      • ronmoana
        New Member
        • Aug 2007
        • 1

        #4
        Originally posted by fplesco
        My assumptions are,
        1. You are already connected with the database.
        2. Rs recordset is available at this point.

        All you need is check if there exist at least a record in the recordset Rs

        Code:
        cboCustomerName.Clear
        if not rs.eof then
           do until rs.eof 
                cboCustomerName.addItem Rs!Customer_Name
                rs.movenext
           loop
        end if
        hi I'm a new member. Just read your reply and Im new in using vb also
        just need little help with regards to above problem. I already did the same thing as you send to him but my problem is I also want to display in text box the the customer address of the chosen combo box item which is in the next field of the customer name. Hope you help me thanks.

        ronmoana.

        Comment

        Working...