?
Solved

Right Click to make record 'current'

Posted on 2016-07-19
4
Medium Priority
?
88 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
[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
4 Comments
 
LVL 38

Assisted Solution

by:PatHartman
PatHartman earned 500 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 48

Accepted Solution

by:
Dale Fye earned 1000 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 500 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

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!

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

800 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