Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2002

    Question Unanswered: Finding out which events are firing

    Does anyone out there know of code that you could use to tell you which events have fired (and how many time each fires) in response to a certain event like pasting data on a line in a form? I thank you in advance for your time and your responses.

  2. #2
    Join Date
    Jan 2007
    Provided Answers: 12
    Why don't you just stick a messagebox in each event?
    MsgBox "Event: Open"
    And wait to see which fires when you paste.
    Trial and error kinda stuff
    Home | Blog

  3. #3
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    and if you wanted to find out the number of times each event fired consider putting a static varaiile in each event.. the static variable should be declared for each event so each event gets their own fluffy wuffy counter

    static NoTriggers as integer
    msgbox "Event:<blah>, triggered:" & notriggers & " times"

    heck you coudl even extend it and build a humungous string which actaully logged waht heppen, or even write it to a logfile or text file

    "event <blah> triggered at " format (now(),"HH:mm:ss") & " trigger count:" & NoTriggers

    so you would get
    open event triggered as 08:15:36:0
    load event......
    current event.......

    one thing to bear in mind is that you can never guarantee that all events will fire in the same sequence every time.

    if you are having event problems then I'd suggest you put a debug on each event and see if its beign triggered.. if its not it could be becuase the form designer doesn't know that there is som code.. if you know your VB/VBA its quite possible to put in some code on an event, but the access runtime doens't pick it up for soem reason. to clear that fault make sure that the event is selected in the properties for the form/control.
    Last edited by healdem; 08-02-07 at 07:09.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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