Report subtotal "#Error" (1 Viewer)

Glowackattack

Registered User.
Local time
Today, 06:54
Joined
Feb 26, 2008
Messages
126
Hi,
I have a set of individual reports that are combined to create one whole report. There is a summary page, and then subsequent breakdowns of each of the summary points on following pages. When one of the breakdowns does not have any information to show, the subtotal and total sections at the bottom show "#Error" because it is trying to sum something that is not there as there are no records meeting the criteria on the breakdown of the report.

Is there any way i can get rid of this?? I just want it to show zero if there are no records....

Thanks for your help,
 

SOS

Registered Lunatic
Local time
Today, 05:54
Joined
Aug 27, 2008
Messages
3,514
Use the NZ function -

For example

=Sum(Nz([FieldName],0))
 

Glowackattack

Registered User.
Local time
Today, 06:54
Joined
Feb 26, 2008
Messages
126
Thanks for the responses guys, I've tried the NZ function to no avail, if i remember correctly that fixes "#Value" errors, not "#Error".

I also played around with your suggestion, Paul, but was not able to get that to show anything other than the same "#Error" value.

Here is what i just figured out to work...

=IIf(DCount("Qry_SalesRpt_NQDCPremierKey![Current Qtr]","[Qry_SalesRpt_NQDCPremierKey]")=0,0,Sum([Current Qtr]))

Whereas my original equation was only

=Sum([Current Qtr])


which finds out if the count of the number of records equals 0, then show 0, otherwise, sum as i normally would.

Thanks guys for your help, you definitely put me on the right track to figuring this out.
 

Users who are viewing this thread

Top Bottom