Null Value to Zero

J

Jenn

Is there a formula, VB Coding, or SQL that will take a Null value, such as
1/0, and make it a 0?

Please advise.

Thank you in advance for your assistance.
 
K

KARL DEWEY

You need to trap it before the error. 5 divided by 0 results in an
error.
Trap it this way --
IIF([X] Is Null OR [Y] Is Null, 0, [X]/[Y])
 
A

Arvin Meyer [MVP]

Either:

NZ([Null Field],0)

or :

IIf(IsNull([Null Field], 0, [Null Field]))
 

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

Top