VERY Simple calculation - NEED Help

  • Thread starter Send Object Command - Two attachments
  • Start date
S

Send Object Command - Two attachments

Basic calculation in query:
3rd column is my expression - Expr1: [Field1]+[Field2]
1st 2 columns are Field 1 and Field 2

It only appears to calculate if there are values in BOTH Field 1 and Field 2
for that row....If there is a value in Field 1, and Field 2 is blank, the
calculation displays nothing.

Example:
Field1 Field 2 Expr1
$41,679.00
$56,468.55 $1,800.00 $58,268.55
$57,842.80
$60,732.60
$41,112.25 $540.00 $41,652.25
$40,516.00

How can I get my calculation to work?? Thanks for any assistance....
 
T

Tom Ellison

Dear SOCT:

The fact behind this is "null" which shows up as being empty. You cannot
add something to "nothing" which does not mean zero but "no value."

So, when no value has been entered, what do you want to add? I'll assume
you want to add zero. The Nz (null zero) function would seem ideal for
this:

Expr1: Nz([Field1], 0) + Nz([Field2], 0)

Tom Ellison


"Send Object Command - Two attachments"
 
W

Wendy Parry

Use the Nz function in the Expr1: field
NZ(field1,valueifnull)+Nz(field2,valueifnull)
 
S

Send Object Command - Two attachments

Thank you very much - works great. Thanks for the quick response.

Wendy Parry said:
Use the Nz function in the Expr1: field
NZ(field1,valueifnull)+Nz(field2,valueifnull)

Basic calculation in query:
3rd column is my expression - Expr1: [Field1]+[Field2]
1st 2 columns are Field 1 and Field 2

It only appears to calculate if there are values in BOTH Field 1 and Field 2
for that row....If there is a value in Field 1, and Field 2 is blank, the
calculation displays nothing.

Example:
Field1 Field 2 Expr1
$41,679.00
$56,468.55 $1,800.00 $58,268.55
$57,842.80
$60,732.60
$41,112.25 $540.00 $41,652.25
$40,516.00

How can I get my calculation to work?? Thanks for any assistance....
 
S

Send Object Command - Two attachments

works great - thanks for the quick response

Tom Ellison said:
Dear SOCT:

The fact behind this is "null" which shows up as being empty. You cannot
add something to "nothing" which does not mean zero but "no value."

So, when no value has been entered, what do you want to add? I'll assume
you want to add zero. The Nz (null zero) function would seem ideal for
this:

Expr1: Nz([Field1], 0) + Nz([Field2], 0)

Tom Ellison


"Send Object Command - Two attachments"
Basic calculation in query:
3rd column is my expression - Expr1: [Field1]+[Field2]
1st 2 columns are Field 1 and Field 2

It only appears to calculate if there are values in BOTH Field 1 and Field
2
for that row....If there is a value in Field 1, and Field 2 is blank, the
calculation displays nothing.

Example:
Field1 Field 2 Expr1
$41,679.00
$56,468.55 $1,800.00 $58,268.55
$57,842.80
$60,732.60
$41,112.25 $540.00 $41,652.25
$40,516.00

How can I get my calculation to work?? Thanks for any assistance....
 
Top