copy past multiple textfields (1 Viewer)

Shas91

New member
Local time
Today, 13:45
Joined
Nov 26, 2019
Messages
19
Hi there !



I want to optimize the copy past function between a Access program and a bought program and I need some help



The routine today is to copy a text field in Access move to the other program and paste it... This has to be repeated three times for each invoice.

My thought is to copy the textfield by code….

1. Something trigger the code in Access to send the first textfield1 to the clipboard (No problem)

2. You mark the fied in the bought program av paste it….. So far so god…

3. Here I want the program to automaticly reload the clipboard with the textfield2 and so on…

Is it even duable ?



// Shas
 

Ranman256

Registered User.
Local time
Today, 16:45
Joined
Apr 9, 2015
Messages
3,765
access can copy the fields, but may not be able to control the other program esp if it's a NON Microsoft app.
(tho some programs it can.)

The function to swap back to the target app, move to the target field, then paste. This would require acccess to control the other app.
It can do it if its a Microsoft app.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 16:45
Joined
May 21, 2018
Messages
4,478
This may be doable, but I would guess this requires windows API. There is no way in VBA to capture the windows paste event into the other app. If this was another office app you may be able to capture an event where the other app is updated. Not sure who here is really good at API. May pm @sonic8. I only use other peoples API code.
 

Shas91

New member
Local time
Today, 13:45
Joined
Nov 26, 2019
Messages
19
Well its not a Microsoft program... and I'm aware that this is a not a funny problem to solve, but sometimes You just need to think a bit diffrent
As long as Access has the focus You can control the happenings...

When You click on the other programs textfield and leave Your cargo to Access it lose its focus...

What If "lost focus" activate a script with a 1 second timer trigger a code that bring back the focus back to Access like the SendKey "Alt tab""

"On focus" can then take control again.

If someone can assist with a code for that script to set Access in focus it should be a god start... You also has the windows scheduler but I'm not very god on this...

Well now its time to end this day but tomorrow is another day.....
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 16:45
Joined
May 21, 2018
Messages
4,478
There is no such thing as Application.lost focus event as far as I know. I am thinking a bit different. Use windows API.
 

Users who are viewing this thread

Top Bottom