Dual Query into Excel spreadsheet question

J

joave

Hi:

I have two queries that yield the same 5 columns as a result, but because
of the structure, it is impossible to put the contents of both into one
query. I would like to combine the two queries and put the results into one
excel spreadsheet (with VBA if possible). Can you help please?

Thank you in advance,

Dave
 
J

joave

Clarification - I want to put the results of both queries into the same
Excel spreadsheet.

Thank you.
 
J

John W. Vinson

Hi:

I have two queries that yield the same 5 columns as a result, but because
of the structure, it is impossible to put the contents of both into one
query. I would like to combine the two queries and put the results into one
excel spreadsheet (with VBA if possible). Can you help please?

Thank you in advance,

Dave

Try a UNION query: you need to go to the SQL window to do it.

SELECT field, field, field, field, field FROM Query1
UNION ALL
SELECT field, field, field, field, field FROM Query2

The fieldnames need not be the same, but the number of fields and their
respective datatypes must match.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top