473,805 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I activate a record using right-click?

1 New Member
Simple question for MS Access 2003 (using VBA)...

I have "continuous " form (e.g. showing many records on a single form window). When I simply click (primary click) on one of those records it becomes the active record. When I right-click (secondary click) I have a short-cut menu that pops up. All of that works fine.

I want to combine those two steps into one (like most Windows Apps). Specifically when I right-click I want the record that I am right-clicking on to become the active record THEN I want the short-cut menu to pop up (so it commands will pertain to the newly right-clicked record).

Any help on how to do this? How can I find out what record I am right-clicking on in a continuous forms window?
Sep 5 '07 #1
3 2714
Rabbit
12,516 Recognized Expert Moderator MVP
Simple answer is you can't do this. Access doesn't have a right-click event nor does it have an option, that I know of, to have it select the record on right-click.
Sep 5 '07 #2
Rabbit
12,516 Recognized Expert Moderator MVP
Resuscribing .
Sep 5 '07 #3
ADezii
8,834 Recognized Expert Expert
Simple question for MS Access 2003 (using VBA)...

I have "continuous " form (e.g. showing many records on a single form window). When I simply click (primary click) on one of those records it becomes the active record. When I right-click (secondary click) I have a short-cut menu that pops up. All of that works fine.

I want to combine those two steps into one (like most Windows Apps). Specifically when I right-click I want the record that I am right-clicking on to become the active record THEN I want the short-cut menu to pop up (so it commands will pertain to the newly right-clicked record).

Any help on how to do this? How can I find out what record I am right-clicking on in a continuous forms window?
I'm not exactly sure if this is what you are looking for, but in a Continuous Form, if you Right-Click on any Field contained within the Form, you can Select that specific Record and should also be able to bring up the associated Short-Cut Menu for the Record. Try placing the following code in the MouseDown() Event of all Fields in the Continuous Form. Right Clicking on the Detail Section does not have the same affect, unless the Record has been previously selected. Let me know how you make out.
Expand|Select|Wrap|Line Numbers
  1. Private Sub LastName_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  2.   If Button = acRightButton Then
  3.     DoCmd.RunCommand acCmdSelectRecord
  4.     'Short-Cut Menu will appear on its own
  5.   End If
  6. End Sub
Sep 6 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
4928
by: Mark | last post by:
I have a working PHP/MySQL application used for data entry. The data entry screen includes a "Save" button. The PHP code for this button looks like this: if (isset($_POST)) { if ($_POST == "") { include ("InsertRecord.inc"); // Insert new record }
4
5201
by: bughunter | last post by:
In version 7.x connect to db activate db db SQL1494W Activate database is successful, however, there is already a connection to the database. works fine - db activated. In 8.x - No! WHY??? :-(
4
2207
by: James P. | last post by:
Hello there, I have a bound-form using Navigator so that the user can move back and forth to update record in the form. Every time a record was modified and the user clicks the Navigator to either move backward or forward to the next record, a message is popped up asking the user to confirm the change. If the user clicks "Yes", the record should be updated and the Navigator takes the user to the next record as clicked. If the user...
5
2008
by: Jonas | last post by:
Can you activate and deactivate the Windows Toolbar function "QuickLaunch" programatically?
5
1564
by: Adda | last post by:
In a Parent mdi form I have a datagrid. I select a record from the grid and then invoke a childmdi form. I add the childmdi to an arraylist to keep track of it. If a user has selected multiple records from the grid and has multiple childmdi forms open and then re-selects a previously selected record, I want to activate that childmdi form. Suppose the arraylist contains indexes 0,1,2,3,4 (5 childmdi forms). A user re-selects a child...
0
2207
by: venkat | last post by:
Hi, I have migrated application code to c#2.0 and when I build the solution I am getting the following warning. My application interacts with Excel. So I need to invoke different methods on Workbook class. At one line I am activating a workbook using workbook object. Activate(); Then I am getting the following error. Ambiguity between method '_Workbook.Activate()' and non-method 'WorkbookEvents_Event.Activate'. Using method group.
2
7907
by: Dave Booker | last post by:
I have a Windows form application that I generally run minimized. When a critical event occurs it instantiates another "Alert" form which I want to grab the user focus. In the Alert constructor I call both this.Show() and this.Activate(), but if the parent application is minimized then the Alert form will also stay minimized (and just flash). How can I cause the Alert form to show itself and grab focus?
17
2532
by: michel.ank | last post by:
Hi, I'm using the class PrintLines and my last record of page aren't with the borders. Somebody can help me? Thanks,
1
4964
by: tomlebold | last post by:
When or should the form Activate event be used? I'm working on an existing application that excutes Me.Refresh on the form Activate (Form_Activate) event. This event causes the form to try to update the current record when it should not be. I have never used this in any of my applications.
0
2027
by: tomlebold | last post by:
When or should the form Activate event be used? I'm working on an existing application that excutes Me.Refresh on the form Activate (Form_Activate) event. This event causes the form to try to update the current record when it should not be. I have never used this in any of my applications.
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10607
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10359
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10364
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10104
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9182
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5541
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4317
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.