using error handler on access

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?
 
S

Stefan Hoffmann

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 <--
 
G

Guest

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
 
D

Douglas J. Steele

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top