Forum Discussion
Activating or shifting focus from Access to Word
- Nov 27, 2019
The problem is that "shifting focus" from one running application to another, in this case, from Access to Word, is not a reliable method, so a different approach is likely to be safer and more stable. That said, your specific circumstances do restrict your options as well.
What you'll need to do is obtain the Windows Handle for the open Word document (there should be a Windows API to do that) and use that information to select and activate it. Not something I've done, but I suspect it is possible.
I think either I am not able to convey my problem or may be it is not possible to do what I want I my situation i.e. shifting the focus from Access to Word.
Anyway thank you very much for your suggestions which may be helpful in another situation.
Regards
The problem is that "shifting focus" from one running application to another, in this case, from Access to Word, is not a reliable method, so a different approach is likely to be safer and more stable. That said, your specific circumstances do restrict your options as well.
What you'll need to do is obtain the Windows Handle for the open Word document (there should be a Windows API to do that) and use that information to select and activate it. Not something I've done, but I suspect it is possible.