I am checking for required fields in the OnClose function and if there is a field missing I want the Close function to stop. It just keeps closing on me. This is what I have:
If Me!txtReqNum <> "" Then
If IsNull(Me!optionReason) Then
MsgBox ("Please enter a reason for the status change.")
Me!optionReason.SetFocus
Exit Sub
End If
End If
If Me!txtReqNum <> "" Then
If IsNull(Me!optionReason) Then
MsgBox ("Please enter a reason for the status change.")
Me!optionReason.SetFocus
Exit Sub
End If
End If