using error handler on access

  • Thread starter Thread starter Roy Goldhammer
  • Start date Start date
R

Roy Goldhammer

Hello there

I would like to build error handler that works from all the application.

To do that i've build function that is being calls from all the vb code in
the application by using On error goto:

When i enter the function, is there a way to know which sub or function and
object called the function?

for example: if the error occur on frmClient at event: Form_AfterUpdate, is
there a way to know on the function that the event was on object frmClient
and the event was Form_AfterUpdate?
 
hi Roy,

Roy said:
When i enter the function, is there a way to know which sub or function and
object called the function?
No, not really.

Use a template mechanismn like in MZTools. It can automatically generate
a stub containing the function/object name.


mfG
--> stefan <--
 
You have hit upon one of the serious limitations of Access.
You will have to pass that data to your function as a parameter.
That kind of defeats the purpose of having a general function.

-Dorian
 
While I agree that's it's a limitation, I'd hardly say that it "defeats the
purpose of having a general function".

There are tools that will automatically generate the call to the generic
error handler, including passing the name of the current routine. For
instance, take a look at the free MZ-Tools add-in that can do that and far,
far more. http://www.mztools.com/v3/mztools3.htm
 
Back
Top