Making #ERROR# Return 0 (Zero)

brian0721

Registered User.
Local time
Today, 08:39
Joined
Dec 5, 2001
Messages
103
In a form, I am pulling a number from a query. However, not everybody is in the query if they do not close a loan. Instead of 0 (zero) it returns #ERROR#. How would I make this reutrn zero instead?

thanks
 
This should get you close to what you want...

If(IsNull([Field1]), 0, [Field1])
 
ghudson said:
This should get you close to what you want...

If(IsNull([Field1]), 0, [Field1])

Where would I put that?
 
I Believe ghudson's reply meant to say IIf as opposed to If.

If your form has a query as its record source you can put this in the query as an expression in the field box, ie: Expr1: IIf(IsNull([Field]), 0, [Field])

You can also use Expr1: Nz([Field]). If should give you the same result.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom