sum of sums isn't working

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following control source in a subform. This works fine for
multiplying quantity of an item with price and any discount.
=nz([intQuantity],0)*(nz([txtprice],0)*(1-nz([dbldiscountpercent],0)))
however, when I try to sum these in the subform footer, by adding sum(
and ) to read as:
=sum(nz([intQuantity],0)*(nz([txtprice],0)*(1-nz([dbldiscountpercent],0))))
I only get #error
I am using the Access Bible and as far as I can tell, I am doing this
correctly.
What am I missing?

TIA
 
Papa Jonah,

One thing that can cause this to happen is if the name of the textbox in
the footer is the same as the name as one of the fields. Does this apply?
 
Thanks for the idea but it does not seem to apply. The txtbox that is not
working is labeled txtItemsTotal. This is supposed to sum the txtboxes
txtitemAmount. The txtitemAmount works. I don't have any fields that share
names with either of those text boxes.


Steve Schapel said:
Papa Jonah,

One thing that can cause this to happen is if the name of the textbox in
the footer is the same as the name as one of the fields. Does this apply?

--
Steve Schapel, Microsoft Access MVP


Papa said:
I have the following control source in a subform. This works fine for
multiplying quantity of an item with price and any discount.
=nz([intQuantity],0)*(nz([txtprice],0)*(1-nz([dbldiscountpercent],0)))
however, when I try to sum these in the subform footer, by adding sum(
and ) to read as:
=sum(nz([intQuantity],0)*(nz([txtprice],0)*(1-nz([dbldiscountpercent],0))))
I only get #error
I am using the Access Bible and as far as I can tell, I am doing this
correctly.
What am I missing?

TIA
 
Back
Top