468,765 Members | 1,279 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

Parent Report With 8 Sub-Reports

I have 8 reports that I want to run. Each report is only about 6-7 lines
long. I'd like to get them all on a single page.
So I created a parent report and made each of the 8 desired reports a
sub-report. That part all works fine.

My problem is that each of the 8 sub-reports is based on a different query.
Each of the 8 queries has 2 parameters. However, the 2 parameters are the
same for all 8 queries. When I run the parent report I am prompted for the 2
parameters 8 different times (one for each query). How can I prompt the user
for the 2 parameters just one time and then use them for all 8 queries?

Thanks In Advance,
Fred

Nov 13 '05 #1
1 1898
Create a pop-up form where the user can enter the two parameters. Add an OK
button on the form and put the foloowing code in the Click event:
Me.Visible = False

Put the following code in the Open event of the parent report:
On Error Resume Next
DoCmd.OpenForm "NameOfPopupForm",,,,,acDialog
If Not IsLoaded("NameOfPopupForm") Then
Cancel = True
Exit Sub
End If

You'll find the IsLoaded function in a standard module in the sample
NorthWind database. You need to copy it and put it in a standard module in
your application.

Put the following code in the Close event of the parent report:
DoCmd.Close acForm, "NameOfPopupForm"

Change the two parameters in your queries to:
Forms!NameOfPopupForm!NameOfControlForFirstParamet er
Forms!NameOfPopupForm!NameOfControlForSecondParame ter

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"Fred Zuckerman" <Zu********@sbcglobal.net> wrote in message
news:tV****************@newssvr14.news.prodigy.com ...
I have 8 reports that I want to run. Each report is only about 6-7 lines
long. I'd like to get them all on a single page.
So I created a parent report and made each of the 8 desired reports a
sub-report. That part all works fine.

My problem is that each of the 8 sub-reports is based on a different query. Each of the 8 queries has 2 parameters. However, the 2 parameters are the
same for all 8 queries. When I run the parent report I am prompted for the 2 parameters 8 different times (one for each query). How can I prompt the user for the 2 parameters just one time and then use them for all 8 queries?

Thanks In Advance,
Fred

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Dayne | last post: by
2 posts views Thread by Jeronimo Bertran | last post: by
10 posts views Thread by Goran Djuranovic | last post: by
1 post views Thread by Yuk Tang | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.