G
Guest
Hello all,
I was wondering if there was any way to reference the name of the currently
executing procedure. Basically, I have error handler code in each procedure
in my database that looks something like:
Form_Load_Exit:
Exit Sub
Form_Load_Error:
Select Case Err
Case Else
MsgBox Err.Number & " - " & Err.Description
DoCmd.Quit
Resume Form_Load_Exit
End Select
What I would like to do is title the MsgBox with the name of the procedure
the error handler is in (ie, Form_Load in the code above) I know I could
hardcode it, but I would really like to be able to just drop in a command
that would do that automatically (I have a LOT of procedures to update, plus
it would be nice for consistency's sake between procedures). Any thoughts?
Thanks,
Matt
I was wondering if there was any way to reference the name of the currently
executing procedure. Basically, I have error handler code in each procedure
in my database that looks something like:
Form_Load_Exit:
Exit Sub
Form_Load_Error:
Select Case Err
Case Else
MsgBox Err.Number & " - " & Err.Description
DoCmd.Quit
Resume Form_Load_Exit
End Select
What I would like to do is title the MsgBox with the name of the procedure
the error handler is in (ie, Form_Load in the code above) I know I could
hardcode it, but I would really like to be able to just drop in a command
that would do that automatically (I have a LOT of procedures to update, plus
it would be nice for consistency's sake between procedures). Any thoughts?
Thanks,
Matt