Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No data returns #error

Status
Not open for further replies.

vangundy

Programmer
Jan 29, 2005
38
CA
When I run my report if there is no data, the text box returns #Error. If there is no data is there a way to display 0 intsead?
 
In the report's On No Data event set the value of the object to 0.

Hope this helps.
 
The only option I have is to choose a macro or report... is there any code invloved?
 
You can also put code in the NoData event for the report.

Tom
 
If you want to display the report but don't want #Error to display in calculated text boxes, use an expression like:

=IIf([HasData], Sum([YourField]),0)

This assumes the control source of your text box currently is:
=Sum([YourField])


Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top