2 unlinked subreports in 1 report

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?
 
N

Nikos Yannacopoulos

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top