View Full Version : Get rid of #Div/0! and #Num! from Report


doran_doran
10-20-2003, 02:10 PM
=(Sum(IIf(nz([acppassfail],0)="Passed",1,0)))/(Sum(IIf(nz([ACPCompletionDate],0)>0,1,0)))


How do I get rid of #Div/0! and #Num!?

The abobe code runs fine until the field I am refering to is vacant.

Thanks
Dianna

Calvin
10-20-2003, 03:01 PM
In your denominator, you wrote your NZ function to return a 0 (zero) if the field value is null, change the null return value to something that won't return an error, possibly the current date.

Also the IIF statement in your denominator is returning a 0 (zero) if the condition is false.

I suggest you rethink the whole expression.