Text Box Problem

  • Thread starter Thread starter denyoung
  • Start date Start date
D

denyoung

On a form, I am attempting to add numbers (currency) in a text box based on
fields in a record. The sum displays correctly when there are values (or 0)
in all of the 5 fields being added but displays nothing when one or more of
the fields is NULL. Is there a way to force the sum to appear when one (or
more) of the added fields is NULL?

Thanks
 
Nz(Field1, 0) + Nz(Field2, 0) + Nz(Field3, 0) + Nz(Field4, 0) + Nz(Field5,
0)
 
On a form, I am attempting to add numbers (currency) in a text box based on
fields in a record. The sum displays correctly when there are values (or 0)
in all of the 5 fields being added but displays nothing when one or more of
the fields is NULL. Is there a way to force the sum to appear when one (or
more) of the added fields is NULL?

Thanks

Look up the Nz function in VBA help.
=Nz([Field1],0) + Nz([Field2],0) + Nz([Field3],0) + etc.....
 
Thanks.
--
Dennis


Douglas J. Steele said:
Nz(Field1, 0) + Nz(Field2, 0) + Nz(Field3, 0) + Nz(Field4, 0) + Nz(Field5,
0)

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)





.
 
Back
Top