Newbee needs help Access 2007 Calculating Fields

T

terry

I have the following fields on a form InvoiceAmountline1 ,
InvoiceAmountLine2 ect..

the total of these is to be stored in a field call total
I have tried to use the expressino buildrer to no success(Field Total)
=InvoiceAmountline1 + InvoiceAmountLine2
 
R

Rick Brandt

terry said:
I have the following fields on a form InvoiceAmountline1 ,
InvoiceAmountLine2 ect..

the total of these is to be stored in a field call total
I have tried to use the expressino buildrer to no success(Field Total)
=InvoiceAmountline1 + InvoiceAmountLine2

No, it should not be stored (anywhere) as storing the results of calculations is
(in almost cases) an incorrect thing to do. A ControlSource expression of...

=InvoiceAmountline1 + InvoiceAmountLine2

....should *display* the result of the calculation (provided neither value is
Null). Any place you need that result just repeat that expression.
 
R

Rick Brandt

terry said:
Thank you Rick
What if InvoiceAmountline3 is null ? or if I use a Zero

Zeros are no problem. To handle Nulls use...

=Nz(InvoiceAmountline1,0) + Nz(InvoiceAmountLine2,0)
 
Top