Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Returning Function/Sub Routine Name to a String

Status
Not open for further replies.

TheFitz

Programmer
Dec 18, 2003
140
GB
Hi All,

Let me give you a little background to this. I have recently taken on an MS Access XP db. As part of this, I've reviewed the code and there is NO error handler at all. [noevil]

I'm looking at creating a separate module purely for logging the errors. To save a lot of faffing, I wanted to create a piece of generic code which I could slap into each sub and function.

The generic code would call the error function passing the error number etc through. I wanted it to pass the erroring sub routine, but I can't find anything to help.

The only suggestion I can find is to manually type this in, which isn't what I want to do.

Given the complexity of Access/VBa, I find it hard to believe that MS haven't included this functionality. (Obviously, I realise it's small in comparison to some of the big boys, but I've managed to complete a number of things in Access that I wouldn't have thought possible)

Can anyone point me in the right direction,

Many thanks for any help in advance,


Fitz
Did you know, there are 10 types of people in this world:
* Those who understand binary
and
* Those who Don't!!
 
Sad, but true.

A limited functionality is given by the Source property of the Err object, but the maximum it gives is the class name.

Not a surprise, though. SQL Server got its Error_Procedure() function starting with version 2005 :)

[pipe]
Daniel Vlas
Systems Consultant

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top