code will run using And IsNotNull

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
 
G

Guest

Try

If Not IsNull(Me.txtDateConfirmed) Then

Instead of
If IsNotNull(Me.txtDateConfirmed) Then
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top