Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Referencing Current Event (97)

    Is there a way to reference the current event code from which a command is run?

    eg,

    sub currentEvent ()
    debug.print .....
    end sub

    to give 'currentEvent' to the debug window?

    I have looked through the forums and Helpfiles, and object broswer, but cant find a reference for the 'CurrentModule.Event.Name'...

    I want to use this to speed up error checking and messages, sorry if it seems odd, I am just curious!
    Thanks,

    pmatz

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Referencing Current Event (97)

    No, I don't think so. You'll have to supply the name explicitly yourself.

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Referencing Current Event (97)

    Hans is correct - and it's a major pain if you want to do error handling and store error info in some sort of table for later review. In that case you have to code the procedure name in every error handling routine. There is however a nifty little package called MZTools that will do lots of the leg work for you. You can read all about it at http://www.mztools.com/.
    Wendell

  4. #4
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Referencing Current Event (97)

    WOW!! That is a very cool utility! Thanks! The XML documenter doesnt work - it crashes when i run it, is this because i need to install the xml support files?
    Thanks,

    pmatz

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Referencing Current Event (97)

    Re the XML documenter, I have never attempted to use it - so I'm not much help there. It may be that it depends on some of the XML support that is available in 2000 or 2002 - I don't believe there was any in Access 97.
    Wendell

  6. #6
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Referencing Current Event (97)

    Yes, thats fine. It works at home (where I have XP and Office 2000)

    Thanks again.
    Thanks,

    pmatz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •