Update & DblClick

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a listbox and there is code for both the AfterUpdate and DblClick
events. However, when I double-click on the listbox, it's only executing the
AfterUpdate event; not the DblClick event. Is there a way in VBA that I can
determine if it was a double-click or just a single-click on the listbox? If
so, I can call the DblClick event myself.

thanks in advance
 
Two ways to know which sub is running
1. Place a MsgBox in each with a different message
2. Put a code break (press F9) on the first line of each sub, the code will
stop and you can see in which sub
 
thanks for responding....I wasn't clear on my question....I know how to debug
VBA...I'm asking what VBA code can I write to determine which event is
firing? If you have both and AfterUpdate and DblClick event on a listbox
ONLY the AfterUpdate is executed, not the DblClick. I need to do two
different sets of code...one for AfterUpdate and another for DblClick...
 
I just checked it, the afterUpdate code run first, and the Double Click event
run second.
You can create a Global variable which you can set differently for each
event, that way you can know which event is executing
 
I'm running AC 2002 and it only fires the AfterUpdate Event. I put MsgBoxs
in the AfterUpate and DblClick events and only the AfterUpdate msgbox is
being displayed.

Is there an option in Access that controls this maybe?
 
never mind...the msgbox was causing the problem, when I took it out it ran
both events...thanks for your help!
 
I was going to chime in that for something like this, it's generally safer
to use Debug.Print statements rather than message boxes.
 
Back
Top