Solved

Right Click to make record 'current'

Posted on 2016-07-19
4
66 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 35

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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying 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

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server functions 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 Microsoft Ac…
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…

839 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