Percentage for zero gives error

  • Thread starter Thread starter Dennis
  • Start date Start date
D

Dennis

In a report I have an expression:

Pct of Budget Spent: ([Expenditures Optical Concat]!
[SumOfAMOUNT]/[tblBudgetSubtype]![OpticalBudgeted])

When the value in both of the above fields are 0, the
reports shows "#error" Otherwise, it produces the correct
result.

When I use this expression in the same report:

=[Text48]/[BudgetTypeTotal]

The Text48 field has the following expression in it:

Unspent Balance: Sum([tblBudgetSubtype]![OpticalBudgeted]-
[Expenditures Optical Concat]![SumOfAMOUNT])

The report shows "#Num!". All fields with numbers show the
correct percentage and all numbers are formatted as
currency. What am I missing? Thanks Dennis
 
Hi,


Try:


Pct of Budget Spent: ([Expenditures Optical Concat]!
[SumOfAMOUNT] / iif( 0=tblBudgetSubtype.OpticalBudgeted , 1,
tblBudgetSubtype.OpticalBudgeted )



Hoping it may help,
Vanderghast, Access MVP
 
Back
Top