+ Reply to Thread
Results 1 to 4 of 4

Inserting MS Access data into Excel as new rows below existing data

  1. #1
    Registered User
    Join Date
    09-11-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    18

    Inserting MS Access data into Excel as new rows below existing data

    I need to import rows from an MS Access table into Excel. The VBA macro below does just that.

    Please Login or Register  to view this content.
    MS Access table1

    Please Login or Register  to view this content.
    When I run the macro once, I get in Excel

    Please Login or Register  to view this content.
    When I run the macro again, I get in Excel

    Please Login or Register  to view this content.
    instead of

    Please Login or Register  to view this content.
    Do you know what I should change in order to import MS Access rows into Excel as new rows of data below existing data?

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: Inserting MS Access data into Excel as new rows below existing data

    Hi mptorr,

    Try this:

    Please Login or Register  to view this content.
    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Registered User
    Join Date
    09-11-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Inserting MS Access data into Excel as new rows below existing data

    Thanks Robert! That worked beautifully.

    Now I am trying to JOIN two tables [pseudocode]

    Please Login or Register  to view this content.
    but just can't get the query syntax to work in the .CommandText line.

    Do you have any suggestions?

  4. #4
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: Inserting MS Access data into Excel as new rows below existing data

    Do you have any suggestions
    You should start a new thread for each new (different) question and mark this one as Solved.

    Thats said, one thing you could try would be to create a query on the database and once you have it working as it should, check it's SQL and try and put that into your code.

    Regards,

    Robert
    Last edited by Trebor76; 08-17-2012 at 09:07 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1