I am trying to get this working correctly:
If the user click on travel, then msgbox will say comments required. then the focus should go to comments field and user will not be able to move out of the field till they write comments. the code I am using:
Private Sub Form_BeforeUpdate (Cancel as Integer)
If Me.Travel = True and IsNull(Me.Comments) Then
msgbox "Comments required"
Cancel = True
End If
End Sub
If the user click on travel, then msgbox will say comments required. then the focus should go to comments field and user will not be able to move out of the field till they write comments. the code I am using:
Private Sub Form_BeforeUpdate (Cancel as Integer)
If Me.Travel = True and IsNull(Me.Comments) Then
msgbox "Comments required"
Cancel = True
End If
End Sub