I've got 2 separate option groups connected to 2 separate text boxes.
In each case when the option value is 2 the text box must be filled in before proceeding to the next record. This works fine for the first option group and text box, but it ignores the second option group message when I go to the next record. Any ideas?
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.FrameImported = 2 And IsNull(txtCountry) Then
MsgBox "You must enter a country"
Cancel = True
If Me.FrameModified = 2 And IsNull(txtModified) Then
MsgBox "You must enter a description"
Cancel = True
End If
End If
End Sub
In each case when the option value is 2 the text box must be filled in before proceeding to the next record. This works fine for the first option group and text box, but it ignores the second option group message when I go to the next record. Any ideas?
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.FrameImported = 2 And IsNull(txtCountry) Then
MsgBox "You must enter a country"
Cancel = True
If Me.FrameModified = 2 And IsNull(txtModified) Then
MsgBox "You must enter a description"
Cancel = True
End If
End If
End Sub