Exporting Multiple Queries to the same Excel File

Exporting Multiple Queries to the same Excel File

Post by UHVibGl » Wed, 04 Jun 2008 22:03:00


Hi,
I was trying to export queries to Excel and used "Output To" action to do
that. The problem is that I want to import the output of several queries to
the same Excel sheet. I used "Run Macro" command to execute another Macro
but it replaced the previous results.
What I want is to make a macro that puts the result of mutiple queries into
the same Excel sheet (each query result in a line in Excel sheet)

Any ideas?
 
 
 

Exporting Multiple Queries to the same Excel File

Post by Steve Scha » Thu, 05 Jun 2008 05:35:57

Public,

Try to create a single query that returns all the data you want. It
could be that the correct use of Criteria will achieve it. It could be
that you need to use a Union Query. Or something else.

If you need more explicit help with this, please post back with details,
explaining the data you want to export and which table(s) it comes from.
The SQL view of the queries would also help us to understand what you
are trying to achieve. Thanks.

--
Steve Schapel, Microsoft Access MVP

 
 
 

Exporting Multiple Queries to the same Excel File

Post by UHVibGl » Thu, 05 Jun 2008 15:08:00

Thanks for your response.
I have tried creating a union query but Access showed me this error:
The query is too complex

Any ideas?
 
 
 

Exporting Multiple Queries to the same Excel File

Post by Steve Scha » Thu, 05 Jun 2008 17:11:38

Public,

Nope, no ideas apart from what I already said:
"Please post back with details, explaining the data you want to export
and which table(s) it comes from. The SQL view of the queries would
also help us to understand what you are trying to achieve."

--
Steve Schapel, Microsoft Access MVP
 
 
 

Exporting Multiple Queries to the same Excel File

Post by Ron200 » Thu, 05 Jun 2008 23:23:35

You have to have each of the queries create a different TAB name in
the output spreadsheet.

perhaps transferspreadsheet Export etc.

Ron