Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why can't Access add two fields when one of them is zero?

Status
Not open for further replies.

carolineJ

Technical User
Sep 25, 2001
43
0
0
SE
I have this bug in my query that really bugs me. The thing is one of my fields in the query is supposed to be a sum of two fields in a table, i.e

Variable 3: [Variable 1]+[Variable 2]

This works just fine, except for one case. When the first variable happens to be null (i.e not zero but missing value) , variable 3 also becomes null even if Variable 2 is not equal to null.

I find this very puzzling and any help to solve this is of course very welcome. Strangely enough this does not happen when variable 2 is null and variable 1 is not equal to null.

 
Hi,

There is a function you can use, I can't remember exactly, but its sometinhg like Nz.

so : Nz[xxx]+Nz[xxx]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top