VERY Simple calculation - NEED Help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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....
 
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"
 
Use the Nz function in the Expr1: field
NZ(field1,valueifnull)+Nz(field2,valueifnull)
 
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....
 
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....
 

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

Back
Top