Originally Posted by
colbywolford
...I'm not understanding what you mean about having the parent form reference the child form footer control. Why would I need to do that...
Perceptus was referring to displaying the results of a calculation done on a Subform but needing to be displayed on the Main Form. You'd have an Unbound Textbox on the Main Form and use this Control Source for it:
=SubformName.Form!ControlNameOnSub
where SubformName is just that, the name of the Subform Control (not the original Datasheet Form name, unless they are one and the same) and ControlNameOnSub is the name of the Control on the Datasheet View Form Footer where the calculation was performed.
Originally Posted by
colbywolford
...The only way I can make this work is by bypassing the [LineTotalCopy] field and using the formula =Sum([Qty]*[ServiceRate]) in the [Subtotal] field. I don't like this as it's just duplicating the [LineTotalCopy] formula...
Like it or not, you cannot run any Aggregate Function against a Calculated Field, you have to run it against the Expression used for the Calculated Field...that's simply one of the rules the Access Gnomes enforce! Basically, it's usually quicker to rerun a calculation than it is to retrieve the data from a Table, which is why Calculated Fields, with a few rare exceptions, should never be stored.
Here's a couple of links that may help you understand the #Name and #Error that are being displayed. In general, both mean that Access cannot, for some reason, evaluate the Control Source of the Control to something that is meaningful.
Resolve #Name Error in a Form/Report
Resolve #Error when the Subform has No Records
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007