Solved

Access Errhandler

Posted on 2002-04-29
8
400 Views
Last Modified: 2008-02-01
Hey i want to know more about the Access Errhandler (included with the Office XP Developers' edition)

For example, when I run the errhandler, i get this:

________________________________________________-
Private Sub Command521_Click()

On Error GoTo ErrHandler
Call EnterProc("Form_projects.Command521_Click")

    OpenAccessReport "rptPhoneList"

Cleanexit:
  Exit Sub


ErrHandler:
Call ErrHandler(Err.Number, Err.Description, Form_projects.Command521_Click)
If boolResume = True Then Resume
If boolResumeNext = True Then Resume Next
GoTo Cleanexit

End Sub

_______________________________________

All I _really_ want to do is to get this line:

Call ErrHandler(Err.Number, Err.Description, Form_projects.Command521_Click)

To read like this:

Call ErrHandler(Err.Number, Err.Description, "Form_projects.Command521_Click")

Ive tried the "" $$CURRENTPROCEDURENAME ""

I haven't had enough time to try the

"" & $$CURRENTPROCEDURENAME & ""

_________________________

has anyone else seen this problem??

0
Comment
Question by:aaronkempf
  • 4
  • 3
8 Comments
 
LVL 2

Expert Comment

by:Syed Irtaza Ali
ID: 6979547
ill try to check this one out. I think i might find a generic one.
0
 
LVL 7

Expert Comment

by:Nosterdamus
ID: 6979675
Hi aaronkempf,

I assume that EnterProc is a global function/sub.

In the module where you defined EnterProc, define a Global parameter (ProcName?) like in the following example:

'Begining of the Module
Option explicite....

Public ProcName As String

Public Sub ProcEnter(ProcedureName as String)
    ProcName = ProcedureName
    .
    .
    ' Put here what ever else you need/want to do
    .
    .
End Sub

and now you can execute:
Call ErrHandler(Err.Number,Err.Description,ProcName)

HTH,

Nosterdamus
0
 
LVL 1

Author Comment

by:aaronkempf
ID: 6979682
the issue here is that i am using the auto-errhandler component that comes with Microsoft Office Developer..

and the very end of this-  I am trying to pass this phrase '$$CURRENTPROCEDURENAME ' and i need to include CHR(34) before and after the phrase $$CURRENTPROCEDURENAME

and i cant get either the CHR(34) or the "" to work correctly..

aaron
0
 
LVL 7

Expert Comment

by:Nosterdamus
ID: 6980179
Try:

"""" & $$CURRENTPROCEDURENAME & """"

HTH,

Nosterdamus
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 7

Accepted Solution

by:
Nosterdamus earned 100 total points
ID: 6980181
It's four (4) double-quote (") characters from each side!
0
 
LVL 1

Author Comment

by:aaronkempf
ID: 6980828
thanks man ill give that a shot...

0
 
LVL 1

Author Comment

by:aaronkempf
ID: 6999549
i didnt think that worked..

ill try again (different project now)
0
 
LVL 7

Expert Comment

by:Nosterdamus
ID: 7026394
Hi aaronkempf,

Glad I could help

;-)

Nosterdamus
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now