• populate a form combo box from an external source

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » populate a form combo box from an external source

    Author
    Topic
    #445243

    Our Excel workbook has a form where users filter their data down to a manageable size dataset. We use a form with a combo box for the filtering. I want to populate a combo box on a form with an SQL statement that queries our data warehouse (“SELECT CLIENT_NO, CLIENT_NAME FROM tblCLIENTS”). I have written a connection string to query the database but only seem to be able to import the client list on a range of cells. I would like to populate the combo box row source with the client list without importing the data to a range of cells if possible. Is this possible? Thanks -aap2-

    Viewing 0 reply threads
    Author
    Replies
    • #1079105

      You can open a recordset on the SQL string, then loop through the records and use the AddItem method of the combo box to fill the list of the combo box.
      Post back if you need more detailed help.

    Viewing 0 reply threads
    Reply To: populate a form combo box from an external source

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: