CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2001
    Posts
    4

    import access data into excel

    How can i (in vba code) access the records of a table, and then display them in a combobox on an excel sheet? I know there has to be a very easy way to do this, anybody out there know what it is?

    thanks.

    -Jason


  2. #2
    Join Date
    Jun 2001
    Location
    Memphis, TN
    Posts
    146

    Re: import access data into excel

    Use the Data Access control (kinda primitive, but it works for this) to access your db file. make sure that your recordsource field on the data control points to the right table. create a combo box and set its datasource to the data control and make sure it points to the field you want listed in the combo box.

    Another way might be to load the db file with a data control (once again, its primitive but it works) and search through it using methods of the data control to do Combo1.AddItem Data1.Recordset.Fields("MyFavoriteField") or something similar.


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

Featured