Retrieving the procedure name at run time
Posted on 2006-06-27
I am writing a global procedure that send an email to the sys admin when an erro occurs in the app. Besides the error info, I would like to include in the email message: the Form name (me.name), the procedure name (???) and the actual line of code that generated the error (or the line number???).
the procedure name :
Is there a way to retrieve the proc name turning runtime, without having it hard-coded in the call statement?
Call ErrorNotify err, "email@example.com", Me.Name & ".Form_Load"
would like it to be something like:
Call ErrorNotify err, "firstname.lastname@example.org", Me.Name & "." & < proc name >
the line that caused the error:
Is there a way to retrieve the line of code that caused the error?