Custom error handler

  • Thread starter Thread starter James Franklin
  • Start date Start date
J

James Franklin

In Access VBA can anyone tell me if there is a way of returning the name of
the procedure/function which is currently running? I am trying to write my
own standard error handler which writes to a log file and I want it to
return the procedure name, without me having to manually insert it as a
string in every instance of the handler.

Failing that, are there any really good handlers already out there which
someone could recommend?

Many thanks!
JimF.
 
James said:
In Access VBA can anyone tell me if there is a way of returning the name of
the procedure/function which is currently running? I am trying to write my
own standard error handler which writes to a log file and I want it to
return the procedure name, without me having to manually insert it as a
string in every instance of the handler.

Failing that, are there any really good handlers already out there which
someone could recommend?


There is no built-in facility to provide a procedure's name.

There are tools, of various sophistication, available out
there on the web that can automatically add error handling
(with procedure name) to your code modules. FMS Inc. has a
very comprehensive package at
http://www.fmsinc.com/products/CodeTools/index.html
or you can build your own based on the ideas in
http://www.mvps.org/access/modules/mdl0040.htm
 
Marshall Barton said:
There is no built-in facility to provide a procedure's name.

There are tools, of various sophistication, available out
there on the web that can automatically add error handling
(with procedure name) to your code modules. FMS Inc. has a
very comprehensive package at
http://www.fmsinc.com/products/CodeTools/index.html
or you can build your own based on the ideas in
http://www.mvps.org/access/modules/mdl0040.htm

For Access 2000 and newer, there's also the indispensible MZ Tools at
http://www.mztools.com/
 
Back
Top