What I am trying to do is when the user goes to another record, the validation checks to see if all combo/text boxes in the sub forms are not null and if they are a message box pops up saying they have to fill in the nulls before they can move on to the next record. The code is in the sub form's Before Update event but nothing is happening and I am unsure if I have to reference the main form or something.
Here is the cleaned up code:
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.cboxTeamWorkScore.ListIndex = -1 Then
MsgBox "Please select a score."
Me.cboxTeamWorkScore.SetFocus
Cancel = True
End If
If Me.cboxReliabilityScore.ListIndex = -1 Then
MsgBox "Please select a score."
Me.cboxReliabilityScore.SetFocus
Cancel = True
End If
If Me.cboxAdaptabilityWorkScore.ListIndex = -1 Then
MsgBox "Please select a score."
Me.cboxAdaptabilityScore.SetFocus
Cancel = True
End If
End Sub