Solved

right-click on a ms/access 2013 field

Posted on 2015-02-09
8
123 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 52

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
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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
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 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
ID: 40625443
If "give up" means you give up, then why did you accept my answer?
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

624 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