Replacing blanks with zeros

M

Mr. Smiley

Is there an easy way to replace blanks with zeros in the results of a query.
I need to use the results of query A to do calculations in query B, but some
of the fields that should contain zeros contain blanks. Thanks.
 
T

tina

you can use a calculation in each query field that needs to be a zero, as

CalcField: Nz(MyField), 0)

or

CalcField: IIf(MyField Is Null, 0, MyField)

hth
 
M

Mr. Smiley

Thanks you all for your help. I the problem to work using tina's solution.

Ofer said:
Try using NZ function

NZ([FieldName],0)

--
I hope that helped
Good luck


Mr. Smiley said:
Is there an easy way to replace blanks with zeros in the results of a query.
I need to use the results of query A to do calculations in query B, but some
of the fields that should contain zeros contain blanks. Thanks.
 

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