Actually division by NULL won't cause any error other than returning a Null
value. Division by ZERO will cause an error.
You need to test to see if you would be dividing by zero and in that case assign
some value. Null if you want it blank or -999 if you want an arbitrary value to
show up, or Zero if you want it to be zero.
IIF([xxtotal loads]= 0, Null ,(1-([xxlate loads]/[xxtotal loads]))) AS
[xxpercent of late loads]
:
Yes, definitely. I have had Overflow errors that were really division by
zero errors. (Or maybe they were Division By Null errors, now that I think
about it).
Ok, now that I know the overflow errors are caused from division by null,
what's the best way to change the nulls to "0". I'm using Access 97, so if
I remember correctly Nz doesn't work. Atleast it didn't a few minutes ago
when I tried it.
Here is the formula causing the overflow:
(1-([xxlate loads]/[xxtotal loads])) AS [xxpercent of late loads]