Results 1 to 5 of 5
  1. #1
    brittain12 is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Apr 2016
    Posts
    11

    Transfer Multiple Queries to Same Excel Workbook

    Yes, i am needing some help! I am an access novice and know i se this database up wrong, but need to see if someone can help me on transfering data out. This is what I have

    - 15 different training queries that have different data in them (all the headings are the same in each query)
    - I want to be able to click a button and a macro to be able to send all the queries to the same excel document.
    - My 15 different queries are "Training1Exp" all the way to "Training15Exp"

    Is this possible?



    Click image for larger version. 

Name:	Capture.JPG 
Views:	12 
Size:	137.5 KB 
ID:	24415

  2. #2
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 10 Access 2013
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    This might be helpful. You will have to repeat the docmd for each query within your vba code.

    http://accessblog.net/2006/07/export...cel-range.html

  3. #3
    brittain12 is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Apr 2016
    Posts
    11
    I have no idea on how to create code, where do i input this at? and when i go to create a macro "transferspreadsheet is not a choce to pic from

  4. #4
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 10 Access 2013
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    I am not familiar with the ins and outs of Macros in Access. They are not the same as VBA. Without details of your situation, one cannot write your code for you. Basically, you will need to put a command button on a Form, create code that uses the TransferSpreadsheet functionality 15 times when the button is created. If you wish to explain in simple English the details of what you want, then someone here may be willing to write the code for you.

    ie. Names of each of the queries, location that the queries should go, Spreadsheet name, Path to the spreadsheet, each query on a different sheet of your workbook or all on one sheet. Lots of variables here that only you know.

  5. #5
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Quote Originally Posted by alansidman View Post
    If you wish to explain in simple English the details of what you want, then someone here may be willing to write the code for you.
    I understand the OP might not understand VBA, but take a look at:
    Ken's Examples for Exporting to EXCEL Workbook Files
    http://www.accessmvp.com/kdsnell/EXCEL_Export.htm

    See the third option:
    Create a Query and Export multiple "filtered" versions of a Query (based on data in another table) to separate Worksheets within one EXCEL file via TransferSpreadsheet (VBA)
    http://www.accessmvp.com/kdsnell/EXC...ExportSameFile

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

Similar Threads

  1. Importing Excel Workbook with multiple Worksheets
    By MTSPEER in forum Programming
    Replies: 4
    Last Post: 04-21-2015, 01:50 PM
  2. Replies: 6
    Last Post: 01-29-2015, 08:53 PM
  3. Replies: 1
    Last Post: 03-12-2012, 02:21 PM
  4. Replies: 4
    Last Post: 06-14-2011, 07:19 PM
  5. Exporting Queries to Excel Sheets, 1 Student per Workbook
    By StudentTeacher in forum Programming
    Replies: 8
    Last Post: 09-02-2010, 11:48 AM

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