2 unlinked subreports in 1 report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report with 2 unlinked subreports in it representing SPENT and
RECEIVED assets for each particular month.
Subreports are based on querry with the condition like:

WHERE (((Month([Date]))=([Enter Month No])));

which gives me the dialogue box to enter the number of the required month.

And the reports work all right except I have to enter the month twice.
Is there any way to store somewhere the data which I enter and use it for
both subreports?
 
Lana,

Use a form to host an unbound text box (or combo, or listbox) in which you
make the month selection. Assuming the form is called frmReportParam and the
control is called ctlMonth, the where clause in the queries should become:

WHERE (((Month([Date]))=(Forms![frmReportParam]![ctlMonth])));

Moreover, you can add two command buttons on the same form, one to preview
and one to print the report. So, the user selects a month, clicks on the
appropriate button, both queries read their parameter from the form.

HTH,
Nikos
 
Back
Top