×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Null values in reports

Null values in reports

Null values in reports

(OP)
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

RE: Null values in reports

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.

RE: Null values in reports

(OP)
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

RE: Null values in reports

I see. You might try IsError().

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close