code will run using And IsNotNull

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following event procedure on the close event of a form the code
works fine if I only use the first part If (Me.OrderStatus) = "Cancelled" Then
DoCmd.OpenForm "CancellationForm"
End If
End Sub
If I try to run as shwon below it halts
Private Sub Form_Close()
If (Me.OrderStatus) = "Cancelled" And IsNotNull(Me.txtDateConfirmed) Then
DoCmd.OpenForm "CancellationForm"
End If
End Sub
If I try just the the following it also halts
Private Sub Form_Close()
If IsNotNull(Me.txtDateConfirmed) Then
DoCmd.OpenForm "CancellationForm"
End If
End Sub
Any suggestions would be gratefully received
 
Try

If Not IsNull(Me.txtDateConfirmed) Then

Instead of
If IsNotNull(Me.txtDateConfirmed) Then
 
Back
Top