João serras-pereira
asked on
right-click on a ms/access 2013 field
I need to open a form if the user right-clicks on a field. How do I do it?
Can anyone help?
Can anyone help?
The right click is generally reserved for shortcut menus.
You might consider the double click event, or even add a button to the right of that control.
You might consider the double click event, or even add a button to the right of that control.
ASKER
But how do I use it? Like that?:
Dim Btn As Integer, _
Shift As Integer, _
X As Single, _
Y As Single
mouse = Fld_F41a_EmpreendedorNUIT. OnMouseUp( Button, Shift, X, Y)
If Buttin = acRightButton Then
MsgBox "A"
Else
MsgBox = "B"
End If
Dim Btn As Integer, _
Shift As Integer, _
X As Single, _
Y As Single
mouse = Fld_F41a_EmpreendedorNUIT.
If Buttin = acRightButton Then
MsgBox "A"
Else
MsgBox = "B"
End If
Just a comment here...
Opening a form on a right click creates non-standard functionality.
Can we ask what is the need for doing this?
Opening a form on a right click creates non-standard functionality.
Can we ask what is the need for doing this?
ASKER
Sure!
Sorry to be so long replying. Actually it is not such a non-standard functionality. When we right-click, what we want is the system to show up some contextual information on the object that we right-click. This is why we use it to obtain specific contextual menus. My case is similar, although no a menu. It is a set of information (contextual) to the field I am selecting.
Anyway... I am still without an answer and already used the click and double-click.... The option to show the information on a form is simply because it is the simplest manner in ms/access...
Joao
Sorry to be so long replying. Actually it is not such a non-standard functionality. When we right-click, what we want is the system to show up some contextual information on the object that we right-click. This is why we use it to obtain specific contextual menus. My case is similar, although no a menu. It is a set of information (contextual) to the field I am selecting.
Anyway... I am still without an answer and already used the click and double-click.... The option to show the information on a form is simply because it is the simplest manner in ms/access...
Joao
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
give up
If "give up" means you give up, then why did you accept my answer?
You could use the MouseUp Event
MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
And test if Button = acRightButton '2
Regards