473,320 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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
1 1633
JConsulting
603 Expert 512MB
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

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

Similar topics

5
by: Jonny | last post by:
Hello, I have created a button on my form which when pressed does the following : 1) Run a pre-defined Macro, which is picking up a query and running my data to excel. However, I need the...
4
by: Anthony Cuttitta Jr. | last post by:
I'm working on some procedures where Access queries are exported to Excel, and then later on, those same workbooks are openned, and I need to target a specific original sheet. Sometimes there will...
4
by: Hans [DiaGraphIT] | last post by:
Hi! I want to export a dataset to an excel file. I found following code on the net... ( http://www.codeproject.com/csharp/Export.asp ) Excel.ApplicationClass excel = new ApplicationClass();...
4
by: paul.chae | last post by:
I have a table in Access with about 3000 records. There are ~60 unique values in the ID field for the 3000 records. What I would like to do is automatically generate multiple Excel worksheets...
0
by: devolper | last post by:
I am devolping a web application which which .net reports to a excel work book .each report in one excel sheet.i am using the following code.......... Dim objDestinationExcel As New...
1
by: smaczylo | last post by:
Hello, I've recently been asked to work with Microsoft Access, and while I feel quite comfortable with Excel, I'm at a complete loss with databases. If someone could help me with this issue I'm...
1
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am...
3
by: jmarcrum | last post by:
I want to export a report (that contains two separate queries, 1. Current year data, and 2. split-year data) from access into excel, but everytime I run my code and export the data to excel, it looks...
4
by: forrestgump | last post by:
I want to be able to export multiple access query results to 1 excel worksheet so the results appear under each other. I need this to show the results of headcount, leavers and starters in a cost...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.