Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    Virginia, USA
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    populate a form combo box from an external source

    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-

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: populate a form combo box from an external source

    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.

Posting Permissions

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