error handler
---
Hi Mark,
below Access 2007, there is no error trapping for macros -- why not
convert your macro to code?
To convert a macro to VBA code,
select the macro in the Database Window,
then, from the menu --> Tools, Macro, Convert Macros To Visual Basic,
then click "Convert"
then Add an error handler to your code
ERROR HANDLER CODE:
put this at the top of your program, right after the procedure
declaration (skip a line first for better readability)
'~~~~~~~~~~~~~~~~~~~~~~
On Error GoTo Proc_Err
'~~~~~~~~~~~~~~~~~~~~~~
... then your statements
'~~~~~~~~~~~~~~~~~~~~~~
put this at the end of the program
'~~~~~~~~~~~~~~~~~~~~~~
Proc_Exit:
On Error Resume Next
'release object variables if any
Exit Function
Proc_Err:
MsgBox Err.Description, , _
"ERROR " & Err.Number _
& " ProcedureName"
'press F8 to step through code and debug
'remove next line after debugged
Stop: Resume
Resume Proc_Exit
'~~~~~~~~~~~~~~~~~~~~~~
where
ProcedureName is the name of your procedure so you can identify what
code the problem is in when you see the error
Warm Regards,
Crystal
*

have an awesome day

*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*