Turning off "null propagation" when adding fields

R

rdra90

I'm trying to add three numeric fields together in a query. Some of the
fields will have null values (in this context, the same a zero) from time to
time. Because of "null propagation," I get a null sum if any one of the
three fields is null. I want the sum of the available field values even if
one or more is blank. How do I do this?
 
F

fredg

I'm trying to add three numeric fields together in a query. Some of the
fields will have null values (in this context, the same a zero) from time to
time. Because of "null propagation," I get a null sum if any one of the
three fields is null. I want the sum of the available field values even if
one or more is blank. How do I do this?

Look up the Nz function in VBA help.

TotalOfFields:Nz([FieldA],0) + Nz([FieldB],0) + etc....
 

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