I've tried what you'd suggested but still get #error
My SubTotal control has the following exprssion as its control source
=Qty.Value*UnitPrice.Value
So then in the form footer I placed
=Sum(Qty.Value*UnitPrice.Value)
which access converts to
=Sum([Qty].[Value]*[UnitPrice].[Value])
This doesn't work so I changed it to
=Sum([Qty]*[UnitPrice])
but even this does not work. Any other suggestions? I must say I am very
surprised at the complexity of such a useful functionality! It can be
done
in reports so easily, why the headache in forms?
Is there a vba way to loop through the forms records and do the sum that
way?
QB
Ken Snell (MVP) said:
You cannot reference the name of a control in the Sum expression; you
must
repeat in the Sum expression the actual expression from the control that
you
want to sum. For example, if a control named Qty contains a calculated
expression such as this:
=[FieldName]*4
And you then want to sum the values from Qty control, you'd use this
expession in the SubQty control:
=Sum([FieldName]*4)
--
Ken Snell
<MS ACCESS MVP>
Question Boy said:
I have a continuous form to process orders
Qty/Unit Price/SubTotal/Taxes/Total
(the SubTotal/Taxes/Total control are all calculated fields)
I am trying to add a control with the cumulative sums for the
SubTotal/Taxes/Total, but keep getting #error? What is the common work
around?
QB