A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Report from parameter query with #Error



 
 
Thread Tools Display Modes
  #1  
Old July 24th, 2007, 06:12 PM posted to microsoft.public.access.reports
Kathy
external usenet poster
 
Posts: 641
Default Report from parameter query with #Error

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.)
--
Kbelo
  #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]
  #3  
Old July 26th, 2007, 12:44 AM posted to microsoft.public.access.reports
Kathy
external usenet poster
 
Posts: 641
Default Report from parameter query with #Error

That was it...thank you. Little things mean a lot!
--
Kbelo


"Marshall Barton" wrote:

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]

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.