Total on form with subform

  • Thread starter Thread starter Ivor Williams
  • Start date Start date
I

Ivor Williams

I have a form with a subform. I have a text box in the footer of the subform
(txtSumUnits) which displays the total of a field in the subform
{=Sum([Units])}. I'm trying to have this value display in a text box on the
form using the following: =sfrBudgetDetails.Form!txtSumUnits. The text box
on the main form is returning #Error even though the text box on the subform
is displaying the expected result. Please help.

Ivor
 
On my website (see sig below) is a small sample database called
"SubformReference.mdb" which illustrates this and other issues with
referencing controls on subforms and subsubforms.
 
That should work *provided that* sfrBudgetDetails is the name of the
SubForm*Control* which may be different from the name of the Form you used
as the Subform (or more accurately, the name of the Form you used as the
SourceObject of the SubformControl).

The sample database "NorthWind has this in the Order Form / Order Subform
combination.

HTH
Van T. Dinh
MVP (Access)
 
Back
Top