Well I have written some standard error handling code, to control a certain error which looks fine, but when I exit the form I get my programmed list of questions come and then a message box conforming to the error detection message box I've written. Basically the code seems to be executing my error handler when there isn't an error. When I don't have the error code in the module it works fine. A small problem but confusing.
My code is...
ErrHandler:
'Trap for Cancel the Event
If Err.Number = 287 Then
MsgBox "No messages will be sent as you have chosen not to send any this time." & vbCrLf & "To send these emails please go through the process again.", vbOKOnly, "Email Deactivation"
Resume ErrExit
Else
MsgBox Err.Number & " : " & Err.Description
'DoCmd.Close
Exit Sub
End If
ErrExit:
DoCmd.Close
The error I recieve is
"0: "
Any Ideas?
Cheers for any help
Sam
My code is...
ErrHandler:
'Trap for Cancel the Event
If Err.Number = 287 Then
MsgBox "No messages will be sent as you have chosen not to send any this time." & vbCrLf & "To send these emails please go through the process again.", vbOKOnly, "Email Deactivation"
Resume ErrExit
Else
MsgBox Err.Number & " : " & Err.Description
'DoCmd.Close
Exit Sub
End If
ErrExit:
DoCmd.Close
The error I recieve is
"0: "
Any Ideas?
Cheers for any help
Sam