Solved

right-click on a ms/access 2013 field

Posted on 2015-02-09
8
111 Views
Last Modified: 2016-02-11
I need to open a form if the user right-clicks  on a field. How do I do it?
Can anyone help?
0
Comment
Question by:jirdeaid
8 Comments
 
LVL 48

Expert Comment

by:Rgonzo1971
Comment Utility
Hi,

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
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
Comment Utility
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.
0
 

Author Comment

by:jirdeaid
Comment Utility
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
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
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?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:jirdeaid
Comment Utility
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
0
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
Comment Utility
You might want to look into creating, or augmenting the right click menu (Form View Control) associated with the textbox, and add an option to that menu, or create your own right click menu for that control.

Check out my series of articles on right click (shortcut) menus, here.
0
 

Author Closing Comment

by:jirdeaid
Comment Utility
give up
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
Comment Utility
If "give up" means you give up, then why did you accept my answer?
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now