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