A
Andre C
I have a form with an exit button. The problem is if the user opens
the form but decides he did not want to open it and presses exit the
validation rule kicks in and so he cannot exit.
As you will see from the code below I added
If Combo107 = Null Then DoCmd.Close
Combo107 should be null until someone selects within it. (it is used
to find a record -customer details) I have put a stop point in the
code after this and combo107 does indeed = null yet does not execute
the command
Any suggests.
Code snip
Private Sub Command92_Click()
On Error GoTo Err_Command92_Click
If Combo107 = Null Then DoCmd.Close
If Duration = 0 Then
MsgBox ("The duration has to be greater than zero.")
Exit Sub
End If
DoCmd.Close
Exit_Command92_Click:
Exit Sub
Err_Command92_Click:
MsgBox Err.Description
Resume Exit_Command92_Click
Also pressing the X in the window makes the prog come up with the
usual cannot find record message, is there a way to supress this?
Andre
the form but decides he did not want to open it and presses exit the
validation rule kicks in and so he cannot exit.
As you will see from the code below I added
If Combo107 = Null Then DoCmd.Close
Combo107 should be null until someone selects within it. (it is used
to find a record -customer details) I have put a stop point in the
code after this and combo107 does indeed = null yet does not execute
the command
Any suggests.
Code snip
Private Sub Command92_Click()
On Error GoTo Err_Command92_Click
If Combo107 = Null Then DoCmd.Close
If Duration = 0 Then
MsgBox ("The duration has to be greater than zero.")
Exit Sub
End If
DoCmd.Close
Exit_Command92_Click:
Exit Sub
Err_Command92_Click:
MsgBox Err.Description
Resume Exit_Command92_Click
Also pressing the X in the window makes the prog come up with the
usual cannot find record message, is there a way to supress this?
Andre