#error ????

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]
 
S

Steve Schapel

Dave,

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

Try it like this...

=Sum([NetAfterCom])-IIf([RProfitLossSub].Report.HasData,[RProfitLossSub]![SumOftxtRate],0)
 
A

Allen Browne

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