reference totals on a datasheet from the main form

vmccune
vmccune used Ask the Experts™
on
I have a form with a datasheet on it that I have sum totals using the totals row.  I would like to reference these totals so I can use them in additional calculations on my main form that will be updated as a change the filters on the datasheet.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Top Expert 2014
Commented:
I don't think you can get to those via code, so you'd have to use a different method. Many devs use a hidden textbox field in the Footer of the form (which can also be hidden), with the ControlSource set to Sum the desired field:

=Sum(YourField)

So if i were to name this field "txSum_Sales", I could then refer to that field anywhere on my form:

Me.SomeOthercontrol = "The Total Sales = " & Me.txSum_Sales

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial