I have a form with a subform. The latter contains a calculated field,
[TotCost], derived from a query. In the footer of this subform is an
unbound text box [FootSum] whose control source = SUM([TotCost]) . works
fine
I want to save the value in [FootSum] into a variable in the main form
called [TotCost]. This is bound to Tbl_Products
Every time I make a new entry in the subform I want to see [TotCost] updated
in the main form to reflect the new price calculated in the subform.
Whenever I make a new entry in the subform the total is correct but it does
not include the last value entered. Why?
Private Sub Form_AfterInser t()
Forms![frmMain]![TotCost] = [FootSum]
Me.Refresh
End Sub
Help would be greatly appreciated.
Many thanks
Geoff
[TotCost], derived from a query. In the footer of this subform is an
unbound text box [FootSum] whose control source = SUM([TotCost]) . works
fine
I want to save the value in [FootSum] into a variable in the main form
called [TotCost]. This is bound to Tbl_Products
Every time I make a new entry in the subform I want to see [TotCost] updated
in the main form to reflect the new price calculated in the subform.
Whenever I make a new entry in the subform the total is correct but it does
not include the last value entered. Why?
Private Sub Form_AfterInser t()
Forms![frmMain]![TotCost] = [FootSum]
Me.Refresh
End Sub
Help would be greatly appreciated.
Many thanks
Geoff
Comment