Make Access the active app

  • Thread starter Thread starter macroapa
  • Start date Start date
M

macroapa

HI,

I have some code that control MSOutlook and therefore Access no-longer
is the active app.

I was expecting to be able to use the code Application.Activate to get
Access back, but this doesn;t seem to exist for access.

Does anyone know the Access equiv for Application.Activate?

Thanks.
 
You can use a Windows API.

Private Declare Function apiSetForegroundWindow Lib "user32" Alias _
"SetForegroundWindow" (ByVal hWnd As Long) As Long

Call pjs_apiSetForegroundWindow(hWnd:=Application.hWndAccessApp)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top