PDA

View Full Version : Event handler for Mouse right click and Select



Shaimaa T
08-11-2014, 05:56 AM
Hi all,

I want to handle the event when I right click and choose "Paste" to pop up a message to the user that he cannot paste; disabling the pasting functionality.

I understand that the Button parameter refers to right or left button , but I need further help on which event to best use (mouse up ,mouse down , mouse move - as it seems to be a mixture of the three) and the code for that event.

Thank you

Best Regards,
Shaimaa

ranman256
08-11-2014, 06:06 AM
The BUTTON value determines which got clicked



Private Sub List_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
' See if the right mouse button was clicked
If Button = acRightButton Then
'DoCmd.CancelEvent
'do event here
End If
End Sub

Shaimaa T
08-11-2014, 06:12 AM
Yes but I don't want to cancel after right button is clicked, but still further on after right click and choosing Paste