I have a ms access form with a image frame control on it, on single click of the image frame it opens up a form with the image full screen and when double click it opens up a form to change the image only the double click event is not calling, when double clicking on the image frame, the single event is calling instead of double click event, does this mean you cant have a double click event if you have a single click event?
i cant understand why the double click event is not calling, do i need code in the single click event procedure to account for the possibility of a second click, this problem has defeated me
That's right, you cannot handle both Single Click and Double Click event for the same control. What you can do is to use the MouseUp event and use the combination of a click plus a key (Control, Shift or Alt) to distinguish between two actions. Ex. Click alone = open a form with the image full screen, while Click + Shift key = open a form to change the image:
Private Sub Image0_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = acLeftButton Then ' Left mouse button.
If Shift = 0 Then ' No key pressed.
ElseIf Shift = acShiftMask Then ' Shift key pressed (could be acCtrlMask or acAltMask).