Multiple Queries in One Report

  • Thread starter Thread starter Jennifer
  • Start date Start date
J

Jennifer

I have another question.

Is it possible to add two different queries to one Report?

I have a "Projects" section and a "Prospective Projects"
section. Each have their own query and varying number of
records from day to day. I'd like to have one report that
lists them both, "Projects" first, and "Prospective
Projects" second.

Is there anyway to do this, or would I be better off using
separate reports?

Thanks again,

Jennifer
 
Suggestions.

1. Subreport
Use a subreport for the 2nd one.
Simplest way to effectively get 2 detail sections on one report.

2. UNION query
If the tables have the same structure, you can combine the 2 queries into
one.
Switch the queries to SQL view (View menu, from query design).
Replace the semicolon at the end of 1st query statement with the word UNION.
Copy the 2nd SQL statement to clipboard (Ctrl+C), and paste into the 1st
(Ctrl+V).
You will end up with:
SELECT ... FROM Projects ...
UNION
SELECT ...
It's a fudge, but sometimes useful.

3. Improved data structure
If the prospective projects have basically the same structure as the
projects, consider combining them into one table, with a yes/no field to
distinguish those that are only "prospective" yet. This is probably the
*best* solution: avoids copying from one table to another, and makes
querying very easy.
 
Back
Top