Les Isaacs
Registered User.
- Local time
- Today, 14:01
- Joined
- May 6, 2008
- Messages
- 186
Hi All
We have an accdb with lots and lots of modules, subs and functions, most of which have decent error trapping: so typically at the end of a sub I have
What I want to do now is to write the errors to a table, so that I can audit them etc. I have written a sub to write the details to a table, which works fine, so now I want to call the sub whenever there is an error. I thought I could do this by replacing
with
- and doing this globally, but in the VB window and doing Ctrl-F, in the 'replace' I can't seem to get the new line after the _Error:
Can this be done? If so I'm blowed if I can see it :banghead:
Thanks for any help
Les
We have an accdb with lots and lots of modules, subs and functions, most of which have decent error trapping: so typically at the end of a sub I have
Code:
uploadEIPs_Error:
420 MsgBox "There has been an error!" & vbNewLine & _
"Line Number: " & Erl & vbNewLine & _
"Error number " & Err.number & vbNewLine & _
"Error description " & Err.Description & vbNewLine & _
"Procedure uploadEIPs of VBA Document Form_frm_EIPs"
Code:
_Error:
Code:
_Error:
Call WriteErrors(Now(),Erl,Err.number,Err.Description,{PROCEDURE_NAME} ,{MODULE_TYPE} ,{MODULE_NAME})
Can this be done? If so I'm blowed if I can see it :banghead:
Thanks for any help
Les