So I tried this and it is complaining about a missing End If... which I think comes from the double If statements at the start of each section (BOA and SBIRS).
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If (Me.BOARunResults = "Nominal" Or Me.BOARunResults = "Off Nominal") Then
If IsNull(Me.BOAOperator) Then
MsgBox "Please select a BOA Operator", vbInformation, "Atention!"
Cancel = True
Me.BOAOperator.SetFocus
End If
If IsNull(Me.BOATracksExpected) Then
MsgBox "Please enter the number of Tracks Expected for BOA", vbInformation, "Atention!"
Cancel = True
Me.BOATracksExpected.SetFocus
End If
If IsNull(Me.BOATracksReceived) Then
MsgBox "Please enter the number of Tracks Received for BOA", vbInformation, "Atention!"
Cancel = True
Me.BOATracksReceived.SetFocus
End If
If IsNull(Me.BOATracksProcessed) Then
MsgBox "Please enter the number of Tracks Processed by BOA", vbInformation, "Atention!"
Cancel = True
Me.BOATracksProcessed.SetFocus
End If
If IsNull(Me.BOATracksReleased) Then
MsgBox "Please enter the number of Tracks Released by BOA", vbInformation, "Atention!"
Cancel = True
Me.BOATracksReleased.SetFocus
End If
If IsNull(Me.BOAComms) Then
MsgBox "Please select the comms type that was used for BOA", vbInformation, "Atention!"
Cancel = True
Me.BOAComms.SetFocus
End If
If (Me.SBIRSRunResults = "Nominal" Or Me.SBIRSRunResults = "Off Nominal") Then
If IsNull(Me.SBIRSSIMOperator) Then
MsgBox "Please select a SBIRS SIM Controller", vbInformation, "Atention!"
Cancel = True
Me.SBIRSSIMOperator.SetFocus
End If
If IsNull(Me.SBIRSTracksExpected) Then
MsgBox "Please enter the number of Tracks Expected for SBIRS", vbInformation, "Atention!"
Cancel = True
Me.SBIRSTracksExpected.SetFocus
End If
If IsNull(Me.SBIRSTracksReceived) Then
MsgBox "Please enter the number of Tracks Received for SBIRS", vbInformation, "Atention!"
Cancel = True
Me.SBIRSTracksReceived.SetFocus
End If
If IsNull(Me.SBIRSTracksProcessed) Then
MsgBox "Please enter the number of Tracks Processed for SBIRS", vbInformation, "Atention!"
Cancel = True
Me.SBIRSTracksProcessed.SetFocus
End If
If IsNull(Me.SBIRSTracksReleased) Then
MsgBox "Please enter the number of Tracks Released for SBIRS", vbInformation, "Atention!"
Cancel = True
Me.SBIRSTracksReleased.SetFocus
End If
If IsNull(Me.SBIRSUnscripted) Then
MsgBox "Please enter the number of Unscripted Boosters for SBIRS", vbInformation, "Atention!"
Cancel = True
Me.SBIRSUnscripted.SetFocus
End If
If IsNull(Me.SBIRSComms) Then
MsgBox "Please select the comms type that was used for SBIRS", vbInformation, "Atention!"
Cancel = True
Me.SBIRSComms.SetFocus
End If
If Len(Nz(Me.SBIRSWorkstation1, "") & Nz(Me.SBIRSWorkstation2, "") & Nz(Me.SBIRSWorkstation3, "") & Nz(Me.SBIRSWorkstation4, "") & Nz(Me.SBIRSWorkstation5, "")) = 0 Then
MsgBox "Please select an Operator for the SBIRS Workstation that was used", vbInformation, "Atention!"
Cancel = True
Me.SBIRSWorkstation1.SetFocus
End If
End Sub