We help IT Professionals succeed at work.

Update total in subform

Ken Milam
Ken Milam asked
Medium Priority
Last Modified: 2020-02-15
Hello Experts,
I have a main form that contains two sub forms.  The Link Master Field for both Sub Forms is [Lot_Number].

Sub form #1 is based on q-LotNumberContainerWeights, uses Datasheet View, and is the data entry form.  In this case, a user is entering the [Weight] of various containers that are unique to a particular [Lot_Number].

Sub Form#2 is based on t-LotNumberContainerWeightTotal and displays the [Total_Weight] of all containers from [Lot_Number].

I would like the [Total_Weight] shown in Sub Form#2 to be updated after the user enters/modifies data  into Sub Form#1.  

How do I accomplish this?

Watch Question

Software & Systems Engineer
Distinguished Expert 2019
Have you tried

Open in new window

in the After Update event in the controls you change data
Hint : this won't work unless Sub Form#2 has code behind ...to fix it...right click Sub Form #2 --->Design view --> press ALT+F11
View Code button on the Ribbon
If the subform has spaces in the name then you reference it like this
[Form_ Subform 2].Requery

Open in new window

Explore More ContentExplore courses, solutions, and other research materials related to this topic.