I have
Code:
If Me.frmSubBookingsControl.Form!StatusID <> 5 Then
DoCmd.Close
End If
If Me.frmSubBookingsControl.Form!StatusID = 5 And Not IsNull(Me.frmSubBookingsControl.Form!CancellationDate) And IsNull(Me.frmSubBookingsControl.Form!CancellationReasonID) And IsNull(Me.frmSubBookingsControl.Form!CancellationContact) Then
MsgBox "Please fill all the fields for the cancellation details"
End If
If Me.frmSubBookingsControl.Form!StatusID = 5 And IsNull(Me.frmSubBookingsControl.Form!CancellationReasonID) Then
MsgBox "Please fill all the fields for the cancellation details"
End If
If Me.frmSubBookingsControl.Form!StatusID = 5 And IsNull(Me.frmSubBookingsControl.Form!CancellationContact) Then
MsgBox "Please fill all the fields for the cancellation details"
End If
If Me.frmSubBookingsControl.Form!StatusID = 5 And Not IsNull(Me.frmSubBookingsControl.Form!CancellationDate) And Not IsNull(Me.frmSubBookingsControl.Form!CancellationReasonID) And Not IsNull(Me.frmSubBookingsControl.Form!CancellationContact) Then
DoCmd.Close
End If
How do I write this correctly? I know I can't have two docmd.close currently