Adding the values of multiple fields

K

KevinK

I have a Purchase Order form that has the fields “Assetsâ€, “Referenceâ€,
“Office Supplies†& “Personalâ€. These fields are located in the Purchase
Order table. What I would like to do is to total these fields for each
purchase order. These fields may not always be populated.
First, do I need to set a default value of “0†instead of a null value for
these fields so a calculation can be performed?
 
R

RonaldoOneNil

You do not have to set a 0 in the field, you can use the Null to zero function

MyTotal = Nz([Assess],0) + Nz([Reference],0) + Nz([Office Supplies],0) +
Nz([Personal],0)
 

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