how do I create an if/then statement in a query in access?

C

christopher

I have an output field in my db that lists [SumOfBALANCE] however, when
performing a later function it turns out that if this field is blank I get a
blank result. The fields won't sum a # field w/ a blank field.

How do I create an if [SumOfBALANCE] = "blank", then [SumOfBALANCE] =0 so
that it actually writes the 0 to my field?

I appreciate any help you can offer!
chris
 
R

Rick B

I think that would be done with the Nz function...

SomeFieldName: Nz([SumOfBalance],0)
 
C

christopher

Thanks! That worked perfectly!

Rick B said:
I think that would be done with the Nz function...

SomeFieldName: Nz([SumOfBalance],0)


--
Rick B



christopher said:
I have an output field in my db that lists [SumOfBALANCE] however, when
performing a later function it turns out that if this field is blank I get
a
blank result. The fields won't sum a # field w/ a blank field.

How do I create an if [SumOfBALANCE] = "blank", then [SumOfBALANCE] =0
so
that it actually writes the 0 to my field?

I appreciate any help you can offer!
chris
 

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