I have a number of reports set up this way.
Report - Record Source = qryClosedCases based on two parameters – [Enter BegDate] and [Enter EndDate]
I ran into a snag when I wanted to add DCounts to the report footer as a snapshot of activity.
DCounts don’t work with parameter variables because they aren’t saved.
So I created frmDateRange with two unbound fields to prompt the end user to enter the BegDate and EndDate.
I have the following code on On_Click: OK button on frmDateRange
Docmd.openreport “rptClosedCases” , , acViewPreview
Report - Record Source = qryClosedCases
With Query now based on FieldName: Close_Date = between [forms]![frmDateRange]![BegDate] and [forms]![frmDateRange]![EndDate]
Works great; however, I have about seven other reports (with corresponding queries as record source) set up the same way and I don’t want a separate frmDateRange form for each report/query.
I have a Master Reporting Menu form for users to select which report to print. IF I use the same frmDateRange, how do I dynamically select the approproiate report based on the button the user clicked.
OR do I need to revamp my Master Reporting Menu to BEGIN with the frmDateRange and then have the using select the desired Report button?
Any guidance is appreciated.
Report - Record Source = qryClosedCases based on two parameters – [Enter BegDate] and [Enter EndDate]
I ran into a snag when I wanted to add DCounts to the report footer as a snapshot of activity.
DCounts don’t work with parameter variables because they aren’t saved.
So I created frmDateRange with two unbound fields to prompt the end user to enter the BegDate and EndDate.
I have the following code on On_Click: OK button on frmDateRange
Docmd.openreport “rptClosedCases” , , acViewPreview
Report - Record Source = qryClosedCases
With Query now based on FieldName: Close_Date = between [forms]![frmDateRange]![BegDate] and [forms]![frmDateRange]![EndDate]
Works great; however, I have about seven other reports (with corresponding queries as record source) set up the same way and I don’t want a separate frmDateRange form for each report/query.
I have a Master Reporting Menu form for users to select which report to print. IF I use the same frmDateRange, how do I dynamically select the approproiate report based on the button the user clicked.
OR do I need to revamp my Master Reporting Menu to BEGIN with the frmDateRange and then have the using select the desired Report button?
Any guidance is appreciated.