question: Blank not Zero?

  • Thread starter Thread starter Phil
  • Start date Start date
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?
 
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)
 
A lot shorter, thanx. Too bad you can't have access do that automagicly.
 

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