Empty Value

R

rml

I have a form that has four currency fields. I trying to total the fields
with a command buttion.

[total] = [A] + + [C]

My problem is, if one of the fields are empty or blank, the total is empty
or blank. How can I make it add the fields even if one is blank or empty?

Thanks.
 
A

Allen Browne

Use Nz() to substitute a zero for null:
[total] = Nz([A],0) + Nz(,0) + Nz([C],0)

Hopefully this is just an example, and you are not really storing the total
in a field like that.
 

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