Report / Sub Report with Union Queries

  • Thread starter Antonio via AccessMonster.com
  • Start date
A

Antonio via AccessMonster.com

Hello,

I created a Report which gathers data from 3 different tables, each one with
similar structures but yet different.
I had to use Union Queries for fetching data from the 3 different tables.

The Record Source of the main report is:

SELECT QryRpt0107Budget.* FROM QryRpt0107Budget UNION ALL SELECT
QryRpt0107Actual.* FROM QryRpt0107Actual UNION ALL SELECT QryRpt0107Forecast.
* FROM QryRpt0107Forecast

I also have Sub-Report that is very much alike the "father" Report, only
simpler, displaying only some Totals. This Sub Report has exactly the same
Record Source.

There are 2 parameters asked in the queries (QryRpt0107Budget,
QryRpt0107Actual, QryRpt0107Forecast), which are ProjectCode and Cut-Off Date.


Problem is after adding the Sub Report, when I run the main Report I have to
type the parameters like 4 times before the report is displayed. Finally it
pops up and everything is ok.


Anyone?
Thank you
Antonio
 
D

Duane Hookom

Apparently you are using parameter prompts for criteria in your queries.
<bold> don't </bold>. Consider pulling your criteria from controls on forms.
 
A

Antonio via AccessMonster.com

Yes I am.
I'm pulling [Enter Project Code] and [Enter Cut-Off Date] but it works fine
in any other Report/Query that I have running so far.
Antonio
Duane Hookom wrote:
Apparently you are using parameter prompts for criteria in your queries.
[quoted text clipped - 27 lines]
Thank you
Antonio
 
D

Duane Hookom

"running so far" doesn't account for future development.

--
Duane Hookom
MS Access MVP
--

Antonio via AccessMonster.com said:
Yes I am.
I'm pulling [Enter Project Code] and [Enter Cut-Off Date] but it works
fine
in any other Report/Query that I have running so far.
Antonio
Duane Hookom wrote:
Apparently you are using parameter prompts for criteria in your queries.
[quoted text clipped - 27 lines]
Thank you
Antonio
 

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