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!

how to display a count of "0" in report

Status
Not open for further replies.
Jan 5, 2004
34
US
Hi,

I have a report that through query counts the number of records in a table for display.

My problem is that if there are no records I am getting "#error". How can I display a "0", if there are no records?

in the text box this i what I have, =
.[count]

Thanks
Click

Email Service Free from Banner ads.
 
If there are no records in the report's record source,
Code:
=Nz([table].[count]),0
will not work. Even if the 0 was inside the ) it still would not work.

To count the records in a record source, try set the control source to:
Code:
=IIf(HasData,Count(*),0)


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