We help IT Professionals succeed at work.

How do I autoupdate a field on a mainform with a calculated value on subform footer

jacobtdad asked
I need to have a calculated value from a subfrom footer autoupdate the value of a field in my mainform.    Main form is    "AuditMainTable" and field name is "FinancialAccuracy".    The subform has a field called "Total" for each record.  In the subform footer I have a calcuated value of "Total"    I need ths value to update the MainForm field  anytime it is updated.
Watch Question

Top Expert 2016


see this link

How to Bring a Subtotal from a Subform to a Main Form
What is the nature of the subform and its total?

Is it a continuous form with the total being the sum of a single field ( like    =sum(myvalue) ) or is the subform a single form with the 'total' being based on several fields in the one record?
Or something else?

The technical issue is to find an event that occurs as the total changes and this requires more detail about the subform andhow the total is calcuated.


Peter57r,  it is a continuous form.  I tried using   Me.Parent.FinancialAccuracy = Me.Text100 in the after update , change event and the only way it will work is if I exit the clic on a field in the Mainform again or add the code to the doubleclick event
Calculated fields do not trigger events.  It is user input that triggers events.

If the total is summing a field in each record then you have to put the code in the afterupdate event of the field that is being summed, assuming that is NOT a calculated field.  If that is also a calculated field then you have to find a different field which is being entered manually, in order to get an event that will be triggered.