Hi
You don't do it like that.
If you want to get a sum of 2 text boxes on the same record and have that
shown in that records you would use
=[abc]+[XYZ]
If you want the sum total of all text boxes in each records (the text box is
called - [DEF]) you would use
=Sum ( Nz ([DEF], 0) )
In the group footer to give the sum of the records in that group
In the form footer to give the sum of the records on the form
If you want (as I think you do) to get the sum total of the 3 text boxes
[price1] and [price2] and [price3]
You would use (in the footer)
=Sum ( Nz ([price1], 0) )
=Sum ( Nz ([price2], 0) )
=Sum ( Nz ([price3], 0) )
Note the Nz will give 0 if the there is no data in the box.
To get a sum total of "all" of these use
=(Sum(Nz([prince1],0))+(Sum(Nz([prince2],0))+(Sum(Nz([prince3],0)))))
Of course there are simpler ways to do this but I have used this methods as
it is the best for earning "how it works".
--
Wayne
Manchester, England.
Baderinwa3 said:
Well I went back a third and put the text book in the footer as you
suggested. It is not calculating it shows a zero. I have 6 fields of items
I named them (item1 item2 and etc) each item has a price field (price1 price2
etc...). In my text box, I wrote the expression
=sum([price1]+[price2]+[price3]+ etc...) hit enter and nothing.
I am willing to try the other formula but what would the control name be?
Wayne-I-M said:
Try changing the formula to
=Sum ( Nz ([ControlName], 0) )
If this does not work can you post the formula and any other information
(formats, control names, etc)
--
Wayne
Manchester, England.
:
That did not work. Is there something else? The formula is fine. I don't
know why it is not working.
:
I have designed a form and I need to place a text box to calculate the prices
of each record. I added the text box and type in my sum expression. My
problems are either the calculations do not appear or if they appear the
calculation is incorrect. What am I doing wrong?