#Num!

D

Dan M.

The following shows the result of a calculation in a
Report. The Report pulls the data from a Query.

Reviewed Returned Rebutted Recinded Accuracy

37 2 0 0 94.59%
0 0 0 0 #Num!
63 0 0 0 100%

Control Source... =1-((Sum([Returned])-(Sum([Rebutted])
+Sum([Recinded])))/Sum([Reviewed]))

Format.......... Percent

When the Reviewed field =0 the calculation returns a value
of #Num!

The (0 Reviewed) field value is needed and cannot be
eliminated or ruled out in the Query.

Is there a way to make it display 0 instead of #Num!

I've run out of ideas...
Please Help. thanks, dm
 
D

Duane Hookom

You are dividing by zero...Use IIf() to test first.
=IIf(Sum([Reviewed])=0,0, 1-((Sum([Returned])-(Sum([Rebutted])
+Sum([Recinded])))/Sum([Reviewed])))
 
D

Dan M.

Yes!! Thanks, dm

-----Original Message-----
You are dividing by zero...Use IIf() to test first.
=IIf(Sum([Reviewed])=0,0, 1-((Sum([Returned])-(Sum ([Rebutted])
+Sum([Recinded])))/Sum([Reviewed])))

--
Duane Hookom
MS Access MVP


The following shows the result of a calculation in a
Report. The Report pulls the data from a Query.

Reviewed Returned Rebutted Recinded Accuracy

37 2 0 0 94.59%
0 0 0 0 #Num!
63 0 0 0 100%

Control Source... =1-((Sum([Returned])-(Sum([Rebutted])
+Sum([Recinded])))/Sum([Reviewed]))

Format.......... Percent

When the Reviewed field =0 the calculation returns a value
of #Num!

The (0 Reviewed) field value is needed and cannot be
eliminated or ruled out in the Query.

Is there a way to make it display 0 instead of #Num!

I've run out of ideas...
Please Help. thanks, dm


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top