By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,367 Members | 946 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,367 IT Pros & Developers. It's quick & easy.

3 SubReports with date parameters

P: n/a
I have one report that consists of 3 subreports. Each subreport is
pulled from a query with date parameters ( Between [start] and [end]
).
When I run this report I have to enter the date parameters 3 times. Is
this normal? Is there a better way?

Thanks for all your suggestions and help in advance...
Norma
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Create a pop-up form named PFrmDateRange with two unbound textboxes, StartDate
and EndDate. Add a command button with the following code in the Click event:

<< Code to check neither StartDate or EndDate is Null >>
<<Code to check EndDate is the same or after StartDate >>
Me.Visible = False

Put the following code in the Open event of the main report:

DoCmd.Open acForm, "PFrmDateRange",,,,,acDialog
DoCmd.Close acForm, "PFrmDateRange"

Put the following code in the criteria of your date field in the query for each
of the subreports:

Between Forms!PFrmDateRange!StartDate And Forms!PFrmDateRange!EndDate

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"Norma" <nj**********@suscom.net> wrote in message
news:20**************************@posting.google.c om...
I have one report that consists of 3 subreports. Each subreport is
pulled from a query with date parameters ( Between [start] and [end]
).
When I run this report I have to enter the date parameters 3 times. Is
this normal? Is there a better way?

Thanks for all your suggestions and help in advance...
Norma

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.