Getting rid of "#Error" messages in calculated fields

  • Thread starter Thread starter John Ortt
  • Start date Start date
J

John Ortt

I am trying to do a sum which takes the number of parts my company issue
away from the number we recieve to get a current stock.

[Subform1].[Form]![TotalReceived]-[Subform2].[Form]![TotalIssued]

The only problem is if there are no issues, I get the following result:
#Error

I tried the following to get round it:

iif(iserror([Subform1].[Form]![TotalReceived]-[Subform2].[Form]![TotalIssued
]),0,[Subform1].[Form]![TotalReceived]-[Subform2].[Form]![TotalIssued])

But it doesn't help. Also tried isnull and isempty

Can anybody advise please.....

John O
 
Not sure but try:

[Subform1].[Form]![TotalReceived]-Nz([Subform2].[Form]![TotalIssued], 0)
 
Back
Top