need help with calculated control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a multi tab subform. One tab, which is named "Bid Subform" has a
control, "CostTotal", which I wish to be a calculated total of a control,
"LineTotalCost", which is on another tab/subform named "BidLineItem
subform2". I have tried 2 expressions in the control source property of
"CostTotal" and gotten error messages:

=[BidLineItem subform2]![LineTotalCost]![Total] yielded the error - #Name?

=Sum([BidLineItem subform2]![LineTotalCost]) yielded the error - #Error

When I click to save the changes, the brackets around LineTotalCost and
anything thereafter vanish. I have tried other variations of the above
expressions, but these seem to be the closest to what I need and what I have
found in various help topics. Would there be another property affecting
this? Can anyone help?? Any suggestions are appreciated!
 
The syntax to refer to a control on a subform is to first refer to the
subform control on the main form, then the .Form property of the subform
control, followed by the control on the subform. To refer to one subform on
a form from another subform on that same parent form, you have to go up the
tree to the parent than back down to the other subform.

Examples:
Parent form to control on subform
=NameOfSubformControl.Form!NameOfControlOnSubform

One subform to another subform on same parent form
=Parent!NameOfSecondSubformControl.Form!NameOfControlOnSecondSubform

The subform control is the control where you set the Parent/Child link field
properties. You need the name of this control. It may or may not be the same
as the name of the subform it holds.
 
Back
Top