Results 1 to 4 of 4

Thread: Adding an ADODB-recordset to a combobox

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    belgium
    Posts
    74

    Red face

    How can I add a recordset to a combobox?


    Thanks

  2. #2
    Member
    Join Date
    Jul 2000
    Location
    Hong kong
    Posts
    53

    You can't!

    You can't technically add a recordset to a combobox, but if you have the name of the recordset (the table?) then you can put the name of the table inside the combobox. When the user selects it you will need to run a query to load that recordset up based on the name in the combobox.

    Remember Combo boxes are used to store strings.

    Francis.

  3. #3
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539

    Talking long shot

    if you mean content of a recordset
    here it goes
    Code:
    with RS
        while not .eof 
            cboBox.AddItem !MyField
            .moveNext
        wend
    end with

  4. #4
    Member
    Join Date
    Aug 2000
    Posts
    51

    Lightbulb

    Try using a data combo box. Set the recordsource property = to the recordset name. Set the listfield property = to the recordset field you want to populate the recordset with.

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