IsError function

  • Thread starter Thread starter inungh
  • Start date Start date
I

inungh

I have following function in the query:

MyResult:IIF(IsError([MyField1]/[MyField2],0, [MyField1].[MyField2])

I want to myResult fiield has zero if (MyField1]/[MyField2]) is error.
The function seems return right result if there is not error, but
MyResult field returns #Error.

Am I on the right track or what I am missign here?

Your information is great appreciated,
 
The error occurs if you divide by zero, so try:
IIf([MyField2] = 0, 0, [MyField1]/[MyField2])
 
Back
Top