One problem I may have is 1 to many relationships between the main form and the subforms. But the sequence is this. A column in each subform is sum'd in the footer of the subforms and set on the mainform (downtime and runtime). I add those values together in another field on the mainform (total time). Then I compare total time to a field on the mainform (scheduled). If equal no color. If less than scheduled yellow, if greater than scheduled then red. As records are added, change, or deleted from subforms the sum's values change but the color is not. The after update is from the subforms, I also included the call.
Thanks for taking your time to help.
Private Sub Form_AfterUpdate()
Call calcTotalTimeColor
Me.Shop_Order.SetFocus
DoCmd.GoToRecord , , acNewRec
End Sub
Public Sub calcTotalTimeColor()
If [Forms]![frmproduction]![txtRunTime] = "" Or [Forms]![frmproduction]![txtRunTime] = 0 Then
If [Forms]![frmproduction]![txtDownTime] = "" Or [Forms]![frmproduction]![txtDownTime] = 0 Then
If [Forms]![frmproduction]![Scheduled Time] < 1 Then
[Forms]![frmproduction]![calcTotalTime].BackColor = vbWhite
Else
[Forms]![frmproduction]![calcTotalTime].BackColor = vbYellow
End If
End If
Else
[Forms]![frmproduction]![calcTotalTime].BackColor = vbRed
End If
End Sub