sum of sums isn't working

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
 
S

Steve Schapel

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?
 
G

Guest

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
 

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