G
Guest
The reply makes perfect sense to me, but I STILL can't
get it to work. The problem apparently lies within my
subform. The calculation for each line item total (qty x
cost) works just fine. But when I try to sum all of the
line item total costs, I get the same #Error message as I
did in my main form. My expression is as follows:
=Sum([Total Price])
(Total Price being the name of the line item total field)
I have tried inputting this expression manually and with
the expression builder, with the same results either way.
I have ensured that my field property is set to currency
and that I am drawing the info from the correct form.
What am I missing?
Place an invisible summary control, say
txtSumofTotalCost,
in the subform footer with Control Source set to:
=Sum([Total Cost])
Refer to it in your main form control source:
=frmPurchaseOrdersSub.Form!txtSumofTotalCost
Kevin Sprinkel
Becker & Frondorf
..
get it to work. The problem apparently lies within my
subform. The calculation for each line item total (qty x
cost) works just fine. But when I try to sum all of the
line item total costs, I get the same #Error message as I
did in my main form. My expression is as follows:
=Sum([Total Price])
(Total Price being the name of the line item total field)
I have tried inputting this expression manually and with
the expression builder, with the same results either way.
I have ensured that my field property is set to currency
and that I am drawing the info from the correct form.
What am I missing?
-----Original Message-----
I'm having trouble building an expression that works.
Here's my scenario:
Purchase Order form
Purchase Order subform - separate line items for each
part ordered, cost, units ordered, total cost
Now I want to create, in the Purchase Order form, a
calculated field to add up all the line item total costs.
I tried to use this expression:
=Sum([frmPurchaseOrdersSub].Form![Total Cost])
It accepted the expression, but then it gives me #Error
in the box. I have set the format as currency, and my
line item totals work just fine.
What am I doing wrong?
Place an invisible summary control, say
txtSumofTotalCost,
in the subform footer with Control Source set to:
=Sum([Total Cost])
Refer to it in your main form control source:
=frmPurchaseOrdersSub.Form!txtSumofTotalCost
Kevin Sprinkel
Becker & Frondorf
..