Hi All,
How should I handle cases where I might have zero...getting the following error:
field that contains zero:Code:Microsoft VBScript runtime error '800a000b' Division by zero
Code:sActThreeMoAgo1 = rs("ActThreeMoAgo")![]()
Hi All,
How should I handle cases where I might have zero...getting the following error:
field that contains zero:Code:Microsoft VBScript runtime error '800a000b' Division by zero
Code:sActThreeMoAgo1 = rs("ActThreeMoAgo")![]()
Maybe something like?Code:If sActThreeMoAgo1 = 0 Then
Hey RR,
But is there no way to make the following equal display 0?
Code:0/8 sActThreeMoAgo1/sAnotherFieldName
Ya, if there is division involved, then you must check the value (with which dividing) for zero. If its not 0, only then divide.
So if its 0 then display 0.
Thanks RR and Micky,
will try something like you suggested...
Code:if sActThreeMoAgo1 > 0 then sMain = sActThreeMoAgo1/sAnotherFieldName else sMain = "0" end if
Bookmarks