#Error ??

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?
 
P

Peter Doering

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
 
Y

Yvonneb

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
 

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