By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,068 Members | 1,176 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,068 IT Pros & Developers. It's quick & easy.

Export two reports from Access to Excel, each on it's own worksheet

P: 1
I am very new to writing code, and this is what I need to do:

I have two Access reports, Report_1 and Report_2, that I need to export into an Excel spreadsheet, creating a tab for each report. I don't need to rename the tabs when I create them, but it would be nice. Also, it would be nice to have the resulting Excel file e-mailed automatically. I can do this with queries, but the report thing stumps me.

I have tried the DoCmd.OutputTo acReport function, but one overwrites the other.

Unfortunatly, outputting the queries is not an option, since the report creates a running sum that the query does not have.

Any suggestions?

Thank you,
Jul 23 '07 #1
Share this Question
Share on Google+
1 Reply


JConsulting
Expert 100+
P: 603
I am very new to writing code, and this is what I need to do:

I have two Access reports, Report_1 and Report_2, that I need to export into an Excel spreadsheet, creating a tab for each report. I don't need to rename the tabs when I create them, but it would be nice. Also, it would be nice to have the resulting Excel file e-mailed automatically. I can do this with queries, but the report thing stumps me.

I have tried the DoCmd.OutputTo acReport function, but one overwrites the other.

Unfortunatly, outputting the queries is not an option, since the report creates a running sum that the query does not have.

Any suggestions?

Thank you,

I've seen this done using a variable for the excel file name, then using excel automation, copy one sheet from one workbook into the other and save. The OutputTo command has no native range or sheet designation properties to play with. So you can't natively do what you want to do. It's going to take code.
J
Aug 1 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.