question: Blank not Zero?

P

Phil

Let us say I have a formula.

(a+b*c) + (d*e*f)

If f is blank, or null, the second piece of the formula evalutes to
blank, and the entire formula evaluates to blank. even though a+b*c
evalutes to 70.

I would want Access to treat a blank field as ZERO when used in a
formula. Instead, it discards the entire formula.

I know how to deal with this on a case by case basis, but
[RoyaltyMap]![minimum]
is much better than
(IsNull([RoyaltyMap]![minimum]),0,[RoyaltyMap]![minimum])
Especially in a complex formula.

Is there anyway to get Access to by default treat a blank cell as ZERO
in numeric formulas?
 
K

Ken Snell \(MVP\)

Use the Nz function to convert a Null to another value, in your case zero:

Nz((a+b*c),0) + Nz((d*e*f),0)
 
Top