#Error ??

  • Thread starter Thread starter RAB TEXAS
  • Start date Start date
R

RAB TEXAS

I have a report created that gives me an error #Error in
some cases. I know it is because I am dividing by Zero.
This is valid at times. How can I force a default value in
place of this?
 
I have a report created that gives me an error #Error in
some cases. I know it is because I am dividing by Zero.
This is valid at times. How can I force a default value in
place of this?

E.g., instead of

=[MyVal]/[Qty]

use

=IIF([Qty]<>0,[MyVal]/[Qty],0)

Peter
 
You can put an IF test in the field (using Build) and if the value is 0 -
use your default - otherwise divide

If you are dividing Field1 by Dividor that will give you the RESULT

RESULT: IIF(Dividor <> 0,Field1/Dividor,0)
The above will default to 0 if the Divisor is zero,

Good Luck!

YTB
 
Back
Top