Solved

right-click on a ms/access 2013 field

Posted on 2015-02-09
8
121 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 51

Expert Comment

by:Rgonzo1971
ID: 40600162
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 48

Expert Comment

by:Dale Fye (Access MVP)
ID: 40600570
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
ID: 40601520
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40602178
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
 

Author Comment

by:jirdeaid
ID: 40611256
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 48

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 40611492
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
ID: 40625136
give up
0
 
LVL 48

Expert Comment

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

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

710 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