Solved

Right Click to make record 'current'

Posted on 2016-07-19
4
72 Views
Last Modified: 2016-07-23
I have a continuous form in Access 2003 application.  The shortcut menu bar is set as ‘MainRightClick’ in the form properties.  ‘MainRightClick’ has all the options available for all lines on the continuous form.

Approximately twenty rows of data fit on the continuous form.   If the user right clicks on any record showing on the form, the record that they were hovering over when they right clicked becomes the current record and the right click menu pops up.  Any action selected from the right click menu is executed on the record where the right click occurred, because it became the current record.  This is exactly the way I want it to work.

I am putting together a new Access 2013 application with a form that I want to work the same way.  It is a continuous form with the ‘Shortcut Menu Bar’  defined as ‘frmProperty_Pre_RightClick_2013’.  frmProperty_Pre_RightClick_2013 is the popup menu.

The form works the same as the original Access 2003 form with one annoying exception.  The exception is: Hovering the mouse over any record on the screen and right clicking does not change the current record.  It does pop up the right click menu but whatever operation is selected is executed on whichever record happens to be current on the form.  To change the current record I have to first click in the record I want to be current, then right click.  I looked thru the options and properties on the old form and new form but I don’t see any differences.

How can I get the new Access 2013 screen to work like the old Access 2003 screen.  Meaning that whichever record the cursor is hovering over when the right click is pressed becomes the current record?
0
Comment
Question by:mlcktmguy
4 Comments
 
LVL 36

Assisted Solution

by:PatHartman
PatHartman earned 125 total points
ID: 41721332
I never noticed this because I don't use custom right-click menus.  But, over the years, many good features of how the interface works have been lost simply because of sloppy coding changes on the part of the MS Access developers.  Most Access development cycles have new teams and so continuity is lost.  If the new programmer didn't know about an existing feature, he is quite likely to clobber it because he himself is not an Access user and doesn't recognize its value and general testing is probably not going to bring the loss of function to light.  I think you are SOL on this one.
0
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 250 total points
ID: 41721493
Instead of setting the forms shortcutmenubar property to the name of your shortcut menu, leave it blank and set the ShortcutMenu property to no.

Then use the Forms mouseup event to fire off your shortcut menu.  If you hover over the record selector and right click, it should select that record and then fire off your shortcut menu..

Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

    If Button = acRightButton Then CommandBars("frmProperty_Pre_RightClick_2013").ShowPopup
    
End Sub

Open in new window

Unfortunately, this will not work if you hover over a control on the form, then you would have to use the MouseUp event of that control.   A little more work but a reasonable workaround.
0
 
LVL 31

Assisted Solution

by:Helen_Feddema
Helen_Feddema earned 125 total points
ID: 41724748
Trying to get an Access 2013 (or 2016) database to work just like a 2003 one is a difficult task, sometimes impossible, so you might be better off seeing how you can do what you need to do using the features of the 2013 database, rather than trying to replicate the old functionality, which (as Pat says) might not work any more because of Microsoft careless coding.
0
 
LVL 1

Author Closing Comment

by:mlcktmguy
ID: 41726140
Thanks to all.  Never occurred to me that the functionality would just disappear.  At least I know now.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Database maintenance 36 98
Access Query: Text to Date 10 28
access query - filter field for particular number format 3 25
Hide shared folder for some users 2 24
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
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…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

679 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