Error Supression on Querie Functions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a flag/setting/function that will supress (or default) the value of
#error when calculating two values

example

Working out a percentage (thanks to help from here) you can pass two values
as follows

(([First Value]-[Second Value])/[First Value])*100

However if both values are 0 you get #error

Jai
 
Jai_Friday said:
Is there a flag/setting/function that will supress (or default) the value of
#error when calculating two values

example

Working out a percentage (thanks to help from here) you can pass two values
as follows

(([First Value]-[Second Value])/[First Value])*100

However if both values are 0 you get #error

Use Immediate-If function...

IIf([FirstValue] = 0, "WHAT", (([First Value]-[Second Value])/[First
Value])*100)

Replace "WHAT" with the value you want to see in the query's output when [First
Value] is equal to zero.
 
Back
Top