Sintax to SUM SubForm values in MainForm

  • Thread starter Thread starter an
  • Start date Start date
A

an

Hello!

I have a MainForm with SubForm.

In SubForm I have numerics fields: A and B, and one
Textbox"C", where C=A-B.
I would like, in TextBox in MainForm, to sum all values of
TextBox"C", where the Id's is exactly in the MainForm and
the SubForm, but I don't know the sintax.

Thanks in advance.
an
 
Put a textbox in the Footer of your subform (View > Headers and Footers).
Give it the name txtSumC The control source should be set to = Sum(A-B).
Then put a textbox on your main form and make it's control source to be =
Forms!YourForm.Form!YourSubform!txtSumC
 
Thanks for your reply.

I tried your solution but I obtained next result in
Textbox in MainForm:
#Name?
In adition, I would like to sum ALL VALUES where Id is
equal in MainForm and SubForm.

Thanks.
an
 
That indicates, most likely, that you have some spelling error in the
control source of the textbox on your main form.
 
Back
Top