Combine two queries into one

S

Sandra Rowe

I am a beginner! I have two queries. I need to somehow
combine or link them into one.

QryA = Qry1 AND Qry2
(I want to show all the rows from both queries)

Can someone tell me the steps to accomplish this?

Thanks!
Sandra
 
C

CJ

Sandra, do a make table qry for Qry1 then run a append
type query for Qry2 back to Qry1. I hope this helps!
 
J

John Vinson

There's a much better way than the MakeTable. It's a bit obscure and
you need to get into the SQL window to do it, but a UNION query is
just the ticket here.

If Qry1 and Qry2 both have the same number of fields, of matching
datatypes, you can open the SQL window and type

SELECT * FROM Qry1
UNION ALL
SELECT * FROM Qry2

If Qry1 returns 150 records and Qry2 returns 250, this will give you
400 records (without creating any new tables).

If you remove the ALL keyword, Access will trim out all duplicate
records, showing you only one instance of each duplicate.
 

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