473,420 Members | 2,160 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,420 software developers and data experts.

How do I activate a record using right-click?

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 2701
Rabbit
12,516 Expert Mod 8TB
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 Expert Mod 8TB
Resuscribing .
Sep 5 '07 #3
ADezii
8,834 Expert 8TB
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
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 ==...
4
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!...
4
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...
5
by: Jonas | last post by:
Can you activate and deactivate the Windows Toolbar function "QuickLaunch" programatically?
5
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...
0
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...
2
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...
17
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
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...
0
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
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...
1
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.