Retuen Zero Value in a query

  • Thread starter Thread starter dg875
  • Start date Start date
D

dg875

Guest
Hi all, I am trying to work out a simple profit/loss number in a query. I have an "Income" table and a "Cost" table. Profit/loss is obviously is Income - Cost. Sometimes however, there is no income. When that is the case I want my query to display a zero, so the end result would be a loss equal to the amount of costs. At moment access leaves it blank. Many Thanks for your help & time.
 
Look around for posts on Nz function. (Null to Zero).
 
Yeah - I have seen those, but when I use that function access omits the income record completely
 
Ah, then you must have enclosed the whole thing in Nz.

You want two Nzs

Expr1: Nz(Field1) - Nz(Field2)

(Check for proper syntax as this is off the top of my head)
 

Users who are viewing this thread

Back
Top Bottom