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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Null values in reports

Status
Not open for further replies.

IndyGill

Technical User
Jan 15, 2001
191
GB
I currently have an Access 2000 Db, which produces a report

The problem
I have a footer which counts the number of records outputted by the report, which is:

=Count(*)

However if there is no records to count it returns a "Error" value, how do I get it to return a "0" value

I have also tried =Nz(Count(*),0)

But this does not seem to work, again all I get is the "Error" sign rather than a Zero value.

I need to gain the zero value as this value is then used in the same report within a sum. The sum fails because the count returned a Error value.

Many thanks in advance.... from a very confused user

Indy
 
Would you rather not print the report at all if there are no records? If so, you can use the No Data property and event procedure for the report to display a message and then cancel the report altogether.
 
The problem in more detail

1) I have a lengthly report with several sub reports
2) I want to count and do variouse sums within the subreports.
3) The figuers worked out in the subreports are then used within the main report to produce an overall figure
4) However if one of my sub reports does not contain any information the sum and count function returns a "error" message
5) Because one of the subreports has returned an "error" value rather than a "0", it messes up my overall sum within the main report.

Please help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top