473,226 Members | 1,286 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,226 software developers and data experts.

Creating a custom right-click "add then paste" item

Dear Access developers,

I have a lot of cut and pasting to do from Excel to an Access form.
But instead of just pasting, I want to "add then paste" the value.
Does anybody have a way to do this? Existing code would be
appreciated!

In other words, I'd like to right click on a form text box and add the
value stored in the clipboard to the existing value which is in the
text box.

As an example, say I have a current value of 12.2 in the text box. In
Excel, I have a value of 2.5. I'll copy the value in Excel (2.5) to
the clipboard, and then I want the "right click menu item" to add it to
the 12.2 and paste 14.7 in the text box.

The "right click menu item" could be added in Windows or strictly for
Access or a specific database, whichever is easiest. If you have some
exisiting code, please post it!

This contextual right-click menu item could be called "Add then paste".

Thanks for you help!

Nov 13 '05 #1
5 3121
dont think you an do this with simple code.

why do you want to cut it, just do the math in your head and change the
value.(if its all look like your exemple its pretty easy.)

Nov 13 '05 #2
I used easy math to illustrate my point, but I do this thousands of
times, so I can write up some VBA Access code or maybe VB.

I can't imagine the code being very complicated. Right click on the
text box, assign the value in the text box to a variable, add the last
value in the clipboard to this and return the total to the text box.

Can anybody propose a starting point with any similar right click
contextual menu?

Nov 13 '05 #3
Add and Paste wrote:
I used easy math to illustrate my point, but I do this thousands of
times, so I can write up some VBA Access code or maybe VB.

I can't imagine the code being very complicated. Right click on the
text box, assign the value in the text box to a variable, add the last
value in the clipboard to this and return the total to the text box.

Can anybody propose a starting point with any similar right click
contextual menu?


The problem is this; where is the "right-click event"? Access doesn't
support this and I can't see any API calls on the Access Web. I would be
interested if you could post back on this one, should you fine a solution.

--
Nov 13 '05 #4
Still no solution found. Does anyone have an alternate way to do this?
(see original post).

Nov 13 '05 #5
> The problem is this; where is the "right-click event"? Access doesn't
support this and I can't see any API calls on the Access Web. I would be
interested if you could post back on this one, should you fine a solution.


There is a MouseDown event.

In one of my apps I use something like:
Sub Control_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = LEFT_BUTTON Then
......
ElseIf Button = RIGHT_BUTTON Then
......
End If

--
Hope this helps
Arno R

Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Josef Blösl | last post by:
hi folks! i have a cart link in all of my listed products on the site. when i press this link i will generate a url like this ...
2
by: ssoss | last post by:
Hi, Trying to create a registration form for members of organizations. I have three tables, Users user_id, user_name, user_mail, etc. Orgs org_id, org_name, org_description, etc. Locs
6
by: F-13 | last post by:
I'm working on a BOM in Access 200 from an example downloaded from from the web. The sample database contains three tables, Assemblies (the list of items needed to assemble any assembly),...
8
by: Tinus | last post by:
Hello all, I've create a custom control (UserControl) and have a custom Item Collection. The control is a custom calendar which is draw using the Graphics Rectangle etc. functions. It is drawn...
2
by: cos75 | last post by:
When I populate a checklistbox with Add method every item is showed equal to the others I would show some item enabled, and some disabled......some item in black text and others in red text Is...
1
by: dorling | last post by:
hi there, i got a COM add-in and it loads fine in to outlook but if i add the following line of code so that i can call a function from an outlook form it doesn't load at all? ...
2
by: AMDRIT | last post by:
Hello everyone, I have created a custom component and one of its properties is a class object with it's own properties. During runtime, I can assign values to the class object properties just...
7
by: Dale | last post by:
I have a design question. I am creating a custom collection of products. The unique key for the products is productId which is an integer. By default, IndexOf(object obj), when obj is an int,...
1
by: RSH | last post by:
I am testing a few concepts in preparation of a project. One of the concepts revolves around a custom dropdownlist class. Basically I am overriding the RenderContents and writing a custom value...
6
by: shapper | last post by:
Hello, I am creating a list of Role as follows: IList<Roleroles = new List<Role>(); roles.Add(new Role { Type = RoleType.Administrator, Name = "Administrador", Open = false }); ... After...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.