View Single Post
  #2  
Old July 24th, 2007, 08:20 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Report from parameter query with #Error

Kathy wrote:

Hello..I am building a report based on a parameter query. The parameter is a
date range. Everything is working correctly except when there are no records
in the date range specified. The result is correct...(as there are no records
in that date range)...but the parameter text box shows "#Error", instead of
the date range specified. I would like that the date range is given and
instead of just a blank report, that "No Records Found" is shown. I am at
novice level and appreciate all your suggestions. Thank you.
(Just to be clear, if a date range is given and there are records, then the
report shows the date range specified and the appropriate records are
listed...I am having a problem when there are no records in the date range.)



Us an expression like this in the data range text box:

=IIf(Report.HasData, [Start date] & " to " & [End Date], "No
records found")

Make sure that the text in the [ ] is **exactly** the same
as the prompt strings in the query.

--
Marsh
MVP [MS Access]