#error ????

  • Thread starter Thread starter Dave Elliott
  • Start date Start date
D

Dave Elliott

In a report I have this syntax which calculates the total Net Profit
If the value IsNull (no Data) then it gives me the #error in the field
How can I eliminate this? (Currency Format)

=Sum([NetAfterCom])-[Reports]![RProfitLoss]![RProfitLossSub].[Report]![SumOftxtRate]
 
Dave,

The value is not Null. It is non-existent.

Try it like this...

=Sum([NetAfterCom])-IIf([RProfitLossSub].Report.HasData,[RProfitLossSub]![SumOftxtRate],0)
 
Try this:
=Nz(Sum([NetAfterCom]),0) - IIf([RProfitLossSub].[Report].HasData,
Nz([RProfitLossSub].[Report]![SumOftxtRate],0), 0)
 
Back
Top