Adding fields in a query

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I have several fields with values in them and some of the fields are null.

In Access 2000, I am adding these fields together, but the only totals I
receive are when both fields have a value.

Is this something to do with Null values and is there a workaround?

Example:

Field 1 Field 2 Field 3 Total

5 7 7 19
3 6

Thanks in advance

Dave
 
You are correct. Rather than adding

Field1+Field2+Field3, use

Nz(Field1,0)+Nz(Field2,0)+Nz(Field3,0).

The Nz() function will substitute 0's for nulls.

HTH, Ted Allen
 
That did it!!

Thanks.

Dave

Ted Allen said:
You are correct. Rather than adding

Field1+Field2+Field3, use

Nz(Field1,0)+Nz(Field2,0)+Nz(Field3,0).

The Nz() function will substitute 0's for nulls.

HTH, Ted Allen
 
Back
Top