Results 1 to 4 of 4

Thread: On Event

  1. #1
    Join Date
    Nov 2002
    Location
    Norway
    Posts
    239

    Question Unanswered: On Event

    On event ‘Click’ The command “Msgbox Screen.ActiveControl.Name” return the current control name.
    Is there a way to figure out that it was in event “On Click” the command was called from?
    The function should be used in a error tracking routine.


    Sincerely
    Vestigo

  2. #2
    Join Date
    Oct 2003
    Location
    US
    Posts
    343
    Nope. But what you can do is pass the name of the function to the error handler. That way you'll know which function caused the error.

  3. #3
    Join Date
    Nov 2002
    Location
    Norway
    Posts
    239
    That’s of course an option, but then I need to manually edit all of my event procedures. :-(

  4. #4
    Join Date
    Oct 2003
    Location
    US
    Posts
    343
    I think you can use the modules object and then use its varoius properties like ProcOfLine to determine the current procedure's name. It is very much possible but a lot of overhead as it has to be added for every procedure.

Posting Permissions

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