473,326 Members | 2,196 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,326 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 3124
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.