I have created thiis formula " =[PRICE1]+[PRICE2]+[PRICE3]+[PRICE4]+[PRICE5]
" to total the value of the five fields named above, I have to enter data in
all five fieldsfor it to work. How can I get it to total when i only have to
use a partial number of the fields?
Linq Adams - 19 Jan 2008 14:37 GMT
Anything plus Null equals Null. Nz(FieldName, 0) converts a Null field to
zero so try
=Nz([PRICE1],0)+Nz([PRICE2],0)+Nz([PRICE3],0)+Nz([PRICE4],0)+Nz([PRICE5],0)
Al Campagna - 19 Jan 2008 14:41 GMT
Use the NZ function...
=NZ([PRICE1])+NZ([PRICE2])+NZ([PRICE3])+NZ([PRICE4])+NZ([PRICE5])
If any element of the calculation is Null... NZ will (by default) substitute
a 0 in it's place.

Signature
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html
"Find a job that you love... and you'll never work a day in your life."
>I have created thiis formula "
>=[PRICE1]+[PRICE2]+[PRICE3]+[PRICE4]+[PRICE5]
[quoted text clipped - 3 lines]
> to
> use a partial number of the fields?