Forum Discussion
Asad_khan1971
Nov 25, 2019Copper Contributor
Activating or shifting focus from Access to Word
Activating or shifting focus from Access to Word Dear Sir I have an Access DB in which I have stored Addresses of clients, I have concatenated all address fields in a Memo field. I have placed a b...
- 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.
Asad_khan1971
Nov 26, 2019Copper Contributor
With the greatest of respect, I don't need more than shifting the focus from Access to Word after I have copied the address.
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
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
George_Hepworth
Nov 27, 2019Silver Contributor
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.