Solved

Access 2007 macro output to excel sheet

Posted on 2011-03-01
4
1,034 Views
Last Modified: 2012-08-13
I have a simple Macro in Access 2007 using the 'Output To' Action to Export a query to an Excel Spreadsheet.

Works perfectly.
However, what I need is to be able to specify to output that query to FileA.xlsx, Sheet 1.
The next query to FileA.xlsx, Sheet 2
The next query to FileA.xlsx, Sheet 3

do-able?
0
Comment
Question by:jn1480
  • 2
4 Comments
 
LVL 3

Expert Comment

by:JAMcDo
ID: 35009592
Clarification please>

Have you 1 query or more than 1 query?

Or . . .

Is the same query reuslts sent to Sheet1, then Sheet2, then Sheet3, . . . in a cyclic manner?  If so, are you trying to track which sheet either was the last sheet or should be the next sheet?

J.
0
 

Author Comment

by:jn1480
ID: 35009619
No tracking needed.
No cycles.

I will literally hand input each query into the Macro myself (I am brand new to this, and fascinated with the automation Macros are going to provide me).

I will assign one action line in the macro to output queryA to sheet/tabA in FileA.xlsx
I will then assign the next action in the macro to output queryB to sheet/tabB still in FileA.xlsx
Then the next action in the macro to output queryC to sheet/tabC still in FileA.xlsx

I want to end up with 3 (and/or many more) query outputs all in the SAME XLSX workbook file, just on separate sheets.
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 250 total points
ID: 35009840

"do-able?"
Sure, but not easily with "Macros"

See this popular link:
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_25141094.html

JeffCoachman
0
 

Author Closing Comment

by:jn1480
ID: 35333360
Didn't match my request entirely, but a great add to my personal knowledge - thanks!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now