Dear All
I’m finding my error handling code does not catch certain problems, one being if the email is ‘cancelled’ from the Outlook window during a SendObject action.
My current code is simple, it’s based on the standard Error Handler stuff written by Access control wizards, here’s an example: –
ExitHandler:
Set DbS = Nothing
Set VendorEmailAddys = Nothing
Set EmailAddyDef = Nothing
Set VendorEmailDef = Nothing
Exit Sub
ErrHandler:
MsgBox Err.Description
Resume ExitHandler
I seem to have got the idea from some where I can add more error handling ability specific to the error number on an If …… Then loop basis. Do I need to do this, or am I missing something simple from the code? If it counts my on ‘error goto ErrHandler’ line is immediately after the ‘Private Sub’ line, do I need to move this, even to add additional error handling for each If …… Then or Do loop??
I can make sure the user doesn’t harm the code by using an mde, but don’t want the user inconvenienced, or able to cancel without the database ‘knowing’.