Results 1 to 3 of 3
  1. #1
    Lukael is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    239

    Right click event - move button not working ?

    Hi,



    I have created a right-click event on my subform. What I want to do with It is to open Cmdbutton with right click, just next to mouse cursor.

    Problem is that Cmdbutton appears on right-click, but doesn't move to desired position, It just stays at It's design view position. Here's code:

    Code:
    Private Sub Ime_APO_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    
    
    If Button = 2 Then
    Forms![MyForm]![Command5].Visible = True
    Forms![MyForm]![Command5].Top = Forms![MyForm]![Mysubform].Form![MysubFormField].Top 
    End If
    
    
    End Sub
    P.S.: Subform is set to Shortcut menu NO, so that I don't get Access right-click menu after code is executed. Not sure If that has to do something with It. And button doesn't move because Subform field is by default set at same Top on form as button - so basically I don't know how to open button next to subform field.

  2. #2
    Lukael is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    239
    I've also found something on creating custom menus and shorcut menus on right-click, but haven't done this before, and can't find It in Access 2010.

    Anybody knows something about this ?

  3. #3
    Lukael is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    239
    Got It ! You have to create custom context menu, in VBA, more convenient for subform controls...I'm closing this thread !

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

Similar Threads

  1. Replies: 2
    Last Post: 02-08-2014, 07:10 PM
  2. an activex button click event error
    By amd711 in forum Programming
    Replies: 2
    Last Post: 11-23-2012, 10:40 PM
  3. Trigger event with button click
    By AMAS in forum Forms
    Replies: 8
    Last Post: 06-07-2012, 09:42 AM
  4. Command button click event
    By R_jang in forum Programming
    Replies: 10
    Last Post: 10-29-2010, 10:13 PM
  5. On Click Event For Button On Form
    By Desstro in forum Forms
    Replies: 3
    Last Post: 08-09-2010, 02:36 PM

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