#Error

  • Thread starter Thread starter SF
  • Start date Start date
S

SF

Hi I have a query contain 3 fields (Commune Code, FY07 and FY08) that
provide data to my form. I want to display % between FY07 and FY08 by
creating another calculated filed using the following formula:

Perc: ([FY08]-[FY07])/([FY08]+[FY07])

I got #Error when FY07 and FY08 equal to 0. Is there away to display 0 or
null rather than #Error?

SF
 
Test the denominator in an IIf function:

Perc: IIf([FY08]+[FY07])=0,0,([FY08]-[FY07])/([FY08]+[FY07]))

or

Perc: IIf([FY08]+[FY07])=0,Null,([FY08]-[FY07])/([FY08]+[FY07]))
 
Back
Top