How to display parameters on a report where the query returns no rows?

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

Guest

Hello

I created a report where the results are based on two date parameters - a [Begin Date] and an [End Date]. The parameters are in the Criteria part of the field [Date] and look like this
=[Begin Date] And <=[End Date]

When there are dates between the parameter rage, I get data on the report. I also pass the parameters to two text boxes on the report with the control sources set to [Begin Date] and [End Date]. When there is data on the report, the dates appear

When the query the report is based on doesn't return any rows, the parameters are not passed on to the text boxes on the report; so I just get two blank spaces

Is there a way to capture and pass the parameters to the report, even though the query the report is based on returns no rows

I have tried creating two fields in the query called [Begin Date] and [End Date]. This creates a circular reference. I don't want the user to have to enter the dates twice, so I don't want to create fields with different names.
 
Consider scrapping parameter prompts for references to controls on forms.
You can then place text boxes on your report with control sources like:
=Forms!frmGetDates!txtBeginDate

--
Duane Hookom
MS Access MVP
--

Ilya said:
Hello,

I created a report where the results are based on two date parameters - a
[Begin Date] and an [End Date]. The parameters are in the Criteria part of
the field [Date] and look like this:
=[Begin Date] And <=[End Date].

When there are dates between the parameter rage, I get data on the report.
I also pass the parameters to two text boxes on the report with the control
sources set to [Begin Date] and [End Date]. When there is data on the
report, the dates appear.
When the query the report is based on doesn't return any rows, the
parameters are not passed on to the text boxes on the report; so I just get
two blank spaces.
Is there a way to capture and pass the parameters to the report, even
though the query the report is based on returns no rows.
I have tried creating two fields in the query called [Begin Date] and [End
Date]. This creates a circular reference. I don't want the user to have to
enter the dates twice, so I don't want to create fields with different
names.
 
Back
Top