Using the same DateRange Form for many reports

trstorer

Registered User.
Local time
Today, 11:11
Joined
May 23, 2000
Messages
30
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.
 
IN overview from 30000 ft, you
could have a form with a combo containing the Names of reports you can select. Also on the form are 2 date selectors
DateFrom and DateTo. These could be datepickers.

Once the user has selected the dates, and the program has accepted them as valid dates, the user could then select the Report in the combobox to run.
Once selected, in the after update event of the combo,
you open the report selected.

For more info see Martin Greens Tips
 
jdraw - Thank you for your prompt response, good idea, and valuable link. I started out thinking one way and the reality is I need to revamp my approach (for the better in the long run). Thanks again.
 

Users who are viewing this thread

Back
Top Bottom