How to bypass onClick event when double clicking

T

ThomasAJ

I have event code in onClick which I do NOT want to run when I double-click.
How do I not run it?
 
K

Ken Snell [MVP]

You can't stop it. You'll need to leave it out of your module if you want to
use the double-click event. By design, a double-click also triggers the
click event and its code will run before the double-click event's code does.
 
T

ThomasAJ

In the onclick event can I find out if the dble-click event has occured so I
can skip the code?
 
K

Ken Snell [MVP]

You could set a global variable in the DblClick event and then test that in
the Click event. However, the Click event occurs before the DblClick event,
so I don't know that that test will be meaningful -- you likely would be
testing before the variable had been set.

And if it did work, you'd need to reset the variable somewhere after the
Click event tests it.
--

Ken Snell
<MS ACCESS MVP>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top