Solved

Right Click to make record 'current'

Posted on 2016-07-19
4
84 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 37

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 48

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

707 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