Results 1 to 2 of 2
  1. #1
    tobinjames is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2011
    Posts
    4

    Exporting multiple queries to multiple ranges in the same worksheet

    I am wondering if anyone can help me figure out what I should be doing in order for me to export multiple queries to multiple ranges in one single excel file.



    I have 3 queries, each of which returns records from a different table. I would like to export the results from Query 1 to range A1:J7500 of a worksheet, the results from Query 2 to range K1:O7500 in the same worksheet, and the results from Query 3 to range P1:S7500 in the same worksheet.

    I have created a macro with 3 TransferSpreadsheet actions, each referring to a query and the desired range. When I run the macro, the results from Query 1 get exported to A1:J7500, but an error message displays when Access tries to export the results from Query 2 into range K1:O7500. The error message is "Table K1:O7500 already exists".

    Is it possible to do what I want to achieve using the TransferSpreadsheet action, or should I be approaching this from a different angle? I have limited VBA skills, so would prefer to avoid having to code something if possible.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Need Help Multiple Table Queries
    By ShredYou in forum Queries
    Replies: 7
    Last Post: 09-10-2011, 01:03 PM
  2. Replies: 7
    Last Post: 08-05-2011, 10:59 AM
  3. Exporting Multiple PDF reports from one report
    By dssrun in forum Programming
    Replies: 0
    Last Post: 06-29-2011, 12:16 PM
  4. SQL Multiple Queries
    By mbake085 in forum Queries
    Replies: 5
    Last Post: 05-13-2011, 01:03 PM
  5. Recordsource with Multiple queries
    By darshita in forum Programming
    Replies: 1
    Last Post: 08-10-2009, 03:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums