Parameter Query - Report

  • Thread starter Thread starter T.Kay
  • Start date Start date
T

T.Kay

I'm running a simple parameter query and it's working fine, however when I go
to load the report based on the query it keeps asking for the parameter over
and over again.

The main report and sub report are based on the same query, but when I
finally enter the parameter enough times only the main report data appears,
the sub-report comes up blank.

Is there a way a parameter query can run a main report and sub report at the
same time?
 
T.Kay said:
I'm running a simple parameter query and it's working fine, however when I go
to load the report based on the query it keeps asking for the parameter over
and over again.

The main report and sub report are based on the same query, but when I
finally enter the parameter enough times only the main report data appears,
the sub-report comes up blank.

Is there a way a parameter query can run a main report and sub report at the
same time?


Time to stop using those parameter prompt type parameters.
Instead create a form with a text box for the parameter
value and a button to open the report. In this arrangement,
the query parameter would look like:
Forms![the form].[the text box]
 
I'm running a simple parameter query and it's working fine, however when I go
to load the report based on the query it keeps asking for the parameter over
and over again.

The main report and sub report are based on the same query, but when I
finally enter the parameter enough times only the main report data appears,
the sub-report comes up blank.

Is there a way a parameter query can run a main report and sub report at the
same time?

I'd suggest using a Form reference as a parameter. Create a unbound form named
(say) frmCrit, with whatever controls you need to enter the report's
parameters - maybe just one textbox.

Instead of

[Enter search term:]

on the criteria line put

=Forms![frmCrit]![txtTerm]

or whatever the name of the control is.

Why a main report and subreport for the *same data* though? How do they
differ? Do you have anything in the Subreport's Master/Child Link Fields - if
so, what?

John W. Vinson [MVP]
 
One way is to put the parameter in a field of a form and reference it
something like below. The form must remain open while the report/query is
running. It can be minimized or hidden though.

[Forms]![frmParameter]![txtVendor]
 
When I built the report, the sub report served as a summary of the report
data.

I'll try the form data. If not I'll start from scratch with the
master/child linked fields.

John W. Vinson said:
I'm running a simple parameter query and it's working fine, however when I go
to load the report based on the query it keeps asking for the parameter over
and over again.

The main report and sub report are based on the same query, but when I
finally enter the parameter enough times only the main report data appears,
the sub-report comes up blank.

Is there a way a parameter query can run a main report and sub report at the
same time?

I'd suggest using a Form reference as a parameter. Create a unbound form named
(say) frmCrit, with whatever controls you need to enter the report's
parameters - maybe just one textbox.

Instead of

[Enter search term:]

on the criteria line put

=Forms![frmCrit]![txtTerm]

or whatever the name of the control is.

Why a main report and subreport for the *same data* though? How do they
differ? Do you have anything in the Subreport's Master/Child Link Fields - if
so, what?

John W. Vinson [MVP]
 
Back
Top