Make MSGBOX come up over all apps running

  • Thread starter Thread starter sprinklingtarn
  • Start date Start date
S

sprinklingtarn

Guest
I have a form that runs a timer every 5 minutes. Depending on what I have put in another table it displays a message (or not) to the user with message details. However, if the user has multiple applications running and the Access application is not currently being used by the user (i.e. they may have Word running and have minimised Access) then the msgbox does not appear. So...

When I display the MSGBOX how can I make it override any application running so that the user is always immediatly aware of the message?

Thanks
 
Take a look at AppActivate...

From Access VBA help:

AppActivate Statement
Activates an application window.
Syntax
AppActivate title[, wait]
The AppActivate statement syntax has these named arguments:

title Required. String expression specifying the title in the title bar of the application window you want to activate. The task ID returned by the Shell function can be used in place of title to activate an application.
wait Optional. Boolean value specifying whether the calling application has the focus before activating another. If False (default), the specified application is immediately activated, even if the calling application does not have the focus. If True, the calling application waits until it has the focus, then activates the specified application.



Remarks

The AppActivate statement changes the focus to the named application or window but does not affect whether it is maximized or minimized. Focus moves from the activated application window when the user takes some action to change the focus or close the window. Use the Shell function to start an application and set the window style.

In determining which application to activate, title is compared to the title string of each running application. If there is no exact match, any application whose title string begins with title is activated. If there is more than one instance of the application named by title, one instance is arbitrarily activated.
 
Thanks

Very much for the tip. Apologies for accidental double post my PC went wrong.
 
I have a windowless app running in the tray, and I wish to pass F11 key to it.
Sendkeys "F11" does not pass F11 to it directly.
How can I address this windowless application in 'appactivate' statement?
 

Users who are viewing this thread

Back
Top Bottom