Getting rid of "#Error" messages in calculated fields

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
 
V

Van T. Dinh

Not sure but try:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top