subform total on main form

  • Thread starter Thread starter JohnE
  • Start date Start date
J

JohnE

I have a main form (FormA) with a subform (SubformA)
within it. The subform is filtered by client and only
the dollar amounts for the filtered client are showing.
Also on the subform is a calc field (txtAmountSum) which
shows the total for the filtered client. I am trying to
have the txt amt show on the main form txt field
(txtRevenue) rather then on the subform. The subform
txtAmountSum will be invisible. I have been following
the examples in the knowledge base, etc but the main form
txt shows either Name? in it. I am attempting to place
an expression in the ControlSource of the mainform txt
field.
Any assistance is appreciated.
*** John
 
Set the Control Source propery ot the txtAmountSum text box to:
=[SubformA].[Form].![txtAmountSum]

If that generates an error:
1. Open the main form in design view.
2. Right-click the edge of the subform control, and choose Properties.
3. Check the Name property ("Other" tab).
The Name of the subform control may be different from the form it contains
(its SourceObject).

If you need an explanation of the ".Form" bit, see:
Referring to Controls on a Subform
at:
http://members.iinet.net.au/~allenbrowne/casu-04.html
 
Great. Feedback appreciated.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Matt said:
I had the same problem and this helped tons. Thanks much.

Set the Control Source propery ot the txtAmountSum text box to:
=[SubformA].[Form].![txtAmountSum]

If that generates an error:
1. Open the main form in design view.
2. Right-click the edge of the subform control, and choose Properties.
3. Check the Name property ("Other" tab).
The Name of the subform control may be different from the form it contains
(its SourceObject).

If you need an explanation of the ".Form" bit, see:
Referring to Controls on a Subform
at:
http://members.iinet.net.au/~allenbrowne/casu-04.html
 
Back
Top