Results 1 to 2 of 2
  1. #1
    bilalo is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    107

    Right click event

    I am using the following code to check if the user made a right click inside a form

    Code:
    Private Sub Detail_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
        If Button = acRightButton Then
            msgbox "Some text"
        End If
    End Sub
    When the user right clicks on a blank space on the form, the event works fine, but if the user right clicks on a control inside the form, the event is not triggered


    Is there a way to do it without adding a MouseUp event for all controls inside the form?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    try the form property KEY PREVIEW=true
    this allows the form to get the event before the control gets it, so you dont have to program every control.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 10-09-2016, 05:41 PM
  2. Need help with click Event
    By DXXPublic in forum Programming
    Replies: 3
    Last Post: 09-23-2015, 06:55 PM
  3. Replies: 13
    Last Post: 09-10-2015, 03:37 PM
  4. Click event of form?
    By BLFOSTER in forum Programming
    Replies: 3
    Last Post: 04-25-2014, 11:29 AM
  5. On-Click event transfer
    By nkenney in forum Forms
    Replies: 16
    Last Post: 03-26-2009, 09:02 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums