Results 1 to 2 of 2
  1. #1
    gopherking is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2011
    Posts
    71

    Display Procedure in Message Box on Error


    I have a standard ErrorHandler procedure that is called by all other procedures if they encounter an error (easier to have one module called rather than re-code it for each procedure in my DB). When procedures call this standard ErrorHandler, they need to pass variables to it in order to display the Error Number and Error Description so that I have some information to go off of when troubleshooting. This is all working fine, but now I would like to add in the Procedure name and/or Module name to the message box so that I have more information as to where a possible problem could occur.

    Does anyone know of a built-in function that will return the current Procedure name and/or Module name rather than hardcoding a variable in each procedure to store this information?

  2. #2
    gopherking is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2011
    Posts
    71
    I found the following KB but I haven't tried it yet:

    http://msdn.microsoft.com/en-us/libr...ffice.12).aspx
    (see the section titled Global ErrorHandler)

    Am still interested in if anyone has any insight on this (have used the CurrentProcName() function) or if they have another solution that they have used and found to work for them.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 01-14-2016, 02:18 PM
  2. How to display message
    By Trojnfn in forum Access
    Replies: 5
    Last Post: 10-20-2011, 12:13 PM
  3. Display 'Important Message' On Contiuous Form
    By mseeker22 in forum Forms
    Replies: 35
    Last Post: 06-19-2011, 07:23 PM
  4. How to display a Message
    By seb in forum Queries
    Replies: 7
    Last Post: 05-27-2011, 11:33 AM
  5. Display a message for some time
    By wasim_sono in forum Programming
    Replies: 2
    Last Post: 03-05-2010, 11:11 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums