I set the OnExit property of the "Cost" field in subform
"subJobDetail" to save the record (see below). Then I call a global
sub to copy the [=sum([cost])] calculated field to a field in the
subform "subJob". The record in "subJob" displays the "writing"
(pencil) icon for the record but does not update visually until I
enter and exit a second field "Markup" that is identically coded.
How do I write code to save the record in the subform "subJob"
Note: Stepping through the code in debug mode works perfectly.
What is the solution?
Code in the subform:
========================
Private Sub Cost_Exit(Cancel As Integer)
SaveRecord
mUpdateJobGrandTotal
End Sub
========================
Private Sub SaveRecord()
If Me.Dirty Then
Me.Dirty = False
End If
End Sub
========================
Code in a module:
========================
Public Sub mUpdateJobGrandTotal()
Forms![frmCustomers]![subJob].Form![txtJobTotal] = _
Forms![frmCustomers]![subJobDetail].Form![txtSumCost] + _
Forms![frmCustomers]![subJobDetail].Form![txtSumMarkup]
End Sub
========================