Summing in a subform

G

Guest

Hi,
I'm using the Order Entry database generated from the wizard. Within the
Orders subform, I have introduced a CostPrice aswell as the UnitPrice so it
looks like this

ProductName UnitPrice CostPrice Quantity UnitSubtotal CostSubtotal

CostPrice is included in my products table and it pulls up fine within the
subform.
The only way I could calculate CostSubtotal is =[UnitPrice]*[Quantity]
within the subform but then I can't sum up these subtotals in the footer as
they are unbound and I get #Error coming up

I want to write a CostLineTotal in the receivables aging report query
something similar to this
CostLineTotal: Sum(CLng([Quantity]*[CostPrice])).

When I put this into the query I get something about ambiguous outer joins
even though CostPrice is only in the Products table. Is there an easier way
around this or how do I do it this way?

Thanks in advance,
JohnnyF
 
G

Guest

Perfect. Should really have thought of that myself. Thank you

Arvin Meyer said:
Try using:

=Sum([UnitPrice]*[Quantity])

in the footer.
--
Arvin Meyer, MCP, MVP
Free MS-Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

JohnnyF said:
Hi,
I'm using the Order Entry database generated from the wizard. Within the
Orders subform, I have introduced a CostPrice aswell as the UnitPrice so
it
looks like this

ProductName UnitPrice CostPrice Quantity UnitSubtotal CostSubtotal

CostPrice is included in my products table and it pulls up fine within the
subform.
The only way I could calculate CostSubtotal is =[UnitPrice]*[Quantity]
within the subform but then I can't sum up these subtotals in the footer
as
they are unbound and I get #Error coming up

I want to write a CostLineTotal in the receivables aging report query
something similar to this
CostLineTotal: Sum(CLng([Quantity]*[CostPrice])).

When I put this into the query I get something about ambiguous outer joins
even though CostPrice is only in the Products table. Is there an easier
way
around this or how do I do it this way?

Thanks in advance,
JohnnyF
 

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