union query of complex queries

  • Thread starter Thread starter Effie
  • Start date Start date
E

Effie

I am trying to do a union query of two other queries. Both of these other
queries are "built up" from lots of preceding queries, but it seems that the
more complex of the two is the one causing the problem when I try to run the
union query. When I try to run it, Access wants to send Microsoft an error
report and it shuts down.

The more complex query is built up from 3 other queries:
-a select query to get the records from certain months of the year and other
criteria
-a second select query based on that first select query to extract the data
for the two chemical parameters that I want to add together to estimate a 3rd
chemical parameter
-a query I made using the "Find Duplicates Query Wizard" -- I used this to
select out the data from the 2nd query in which the two chemical parameters
were measured at the same site on the same date
-a 4th query based on the "Find Duplicates" query, in which I use the totals
button to group by site and date, and get a sum of the two chemical parameters

It's this 4th query that I'm trying to union with another query that is
built up from just a few select queries. Help? Options for someone who
doesn't know SQL/VBA/etc?
 
For something this complex, I prefer to write data to temp tables using
Append queries. Then, base any subsequent queries on the temp tables.

You can execute the queries manually in the proper sequence, or create a new
macro and use the OpenQuery action to trigger them.
 
Back
Top