Combine two queries into one

  • Thread starter Thread starter Sandra Rowe
  • Start date Start date
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
 
Sandra, do a make table qry for Qry1 then run a append
type query for Qry2 back to Qry1. I hope this helps!
 
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.
 
Back
Top