Need to Output From Access to Multiple Tabs in Excel (1 Viewer)

HaroldIII

Registered User.
Local time
Today, 13:43
Joined
Feb 2, 2011
Messages
55
:confused:I have multiple queries that are dated for every month of 2009, 2010, and 2011.

How do i get Access to take every month for every year and place them on different tabs in excel....

Example, my end result should be:

Tab1: Jan-2009
Tab2: Feb-2099
Etc...
all the way to Dec-2011

but I want it all in one workbook

thanks
 

thingssocomplex

Registered User.
Local time
Today, 18:43
Joined
Feb 9, 2009
Messages
178
If you use 'DoCmd.TransferSpreadsheet' you can pass the name of the
worksheet as an Range argument

So just use successive calls to TransferSpreadsheet to export each
query, passing the same filename but a different Range name each time.
 

HaroldIII

Registered User.
Local time
Today, 13:43
Joined
Feb 2, 2011
Messages
55
So im going to change:

DoCmd.OutputTo acOutputQuery, "Jan_2009", acFormatXLSX, "R:\STATS\IVY's Folder\CMTA Stats Master Report\CMTA Stats Output\Jan-2009.xlsx", False

to:
DoCmd.TransferSpreadsheet acOutputQuery, "Jan_2009", acFormatXLSX, "R:\STATS\IVY's Folder\CMTA Stats Master Report\CMTA Stats Output\Jan-2009.xlsx", False

where "Jan_2009" is the query Name..??
 

Users who are viewing this thread

Top Bottom