ListBox Click & DoubleClick events
I'm developing an app in Access 2007 using VBA. I have a ListBox on a form and I want the code to execute Routine A if the list box is single clicked and Routine B if it is double clicked. I am really struggling to do what I thought would be simple.
What actually happens is that if you click the ListBox then it fires the click event so I can run routine A from there. No problem.
If you double click it fires both the Click and DoubleClick events so it executes Routines A and B which is not what I want.
I tried setting flags in the Click and DoubleClick events thinking I could test the value of these flags in the AfterUpdate event and then decide which routine to run but it fires the AfterUpdate event before either the Click or DoubleClick event.
Can anyone help me understand how I can get it to run Routine A on a click or Routine B on a double click.