MS Access force a popup on top of other windows?? Is this possible?

%3CLINGO-SUB%20id%3D%22lingo-sub-307391%22%20slang%3D%22en-US%22%3EMS%20Access%20force%20a%20popup%20on%20top%20of%20other%20windows%3F%3F%20Is%20this%20possible%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-307391%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20just%20wondering%20if%20there%20is%20a%20way%20to%20have%20access%20display%20a%20popup%20form%20(even%20just%20a%20message%20saying%2C%20%22hey%20you%20got%20a%20new%20entry%20by%20an%20use!%22%26nbsp%3B%20ON%20TOP%20of%20another%20window%20(say%2C%20Chrome%20Explorer%2C%20or%20whatever%20other%20windows.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20this%20possible%3F%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-307391%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAccess%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1169353%22%20slang%3D%22en-US%22%3ERe%3A%20MS%20Access%20force%20a%20popup%20on%20top%20of%20other%20windows%3F%3F%20Is%20this%20possible%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1169353%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F257646%22%20target%3D%22_blank%22%3E%40perrycheng%3C%2FA%3E%26nbsp%3BIs%20this%20still%20possible%3F%26nbsp%3B%20The%20code%20I%20copied%20down%20doesn't%20seem%20to%20do%20anything.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOption%20Compare%20Database%3CBR%20%2F%3EOption%20Explicit%3CBR%20%2F%3EPublic%20Declare%20Function%20SetForegroundWindow%20_%3CBR%20%2F%3ELib%20%22user32%22%20_%3CBR%20%2F%3E(ByVal%20hwnd%20As%20Long)%20_%3CBR%20%2F%3EAs%20Long%3C%2FP%3E%3CP%3EPublic%20Function%20ActivateAccessApp()%20As%20Boolean%3CBR%20%2F%3E'Brings%20the%20DB%20to%20the%20front%20of%20all%20open%20windows%3CBR%20%2F%3EDim%20appTarget%20As%20Access.Application%3C%2FP%3E%3CP%3ESet%20appTarget%20%3D%20GetObject(CurrentDb.Name)%3CBR%20%2F%3EActivateAccessApp%20%3D%20Not%20(SetForegroundWindow(appTarget.hWndAccessApp)%20%3D%200)%3CBR%20%2F%3ESet%20appTarget%20%3D%20Nothing%3C%2FP%3E%3CP%3EEnd%20Function%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-331347%22%20slang%3D%22en-US%22%3ERe%3A%20MS%20Access%20force%20a%20popup%20on%20top%20of%20other%20windows%3F%3F%20Is%20this%20possible%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-331347%22%20slang%3D%22en-US%22%3ESo%2C%20I%20found%20a%20codes%20below%20from%20somewhere%2C%20can't%20remember%20where.%20It%20works!%20However%2C%20it%20closes%20all%20my%20active%20forms.%20I%20really%20don't%20know%20what%20this%20module%20does%20for%20me%2C%20so%2C%20I%20don't%20know%20how%20to%20prevent%20it%20from%20closing%20my%20active%20open%20forms%20(it%20is%20a%20module%2C%20and%20then%20I%20just%20call%20it%20from%20an%20event)%3A%3CBR%20%2F%3E%3CBR%20%2F%3EOption%20Compare%20Database%3CBR%20%2F%3EOption%20Explicit%3CBR%20%2F%3EPublic%20Declare%20Function%20SetForegroundWindow%20_%3CBR%20%2F%3ELib%20%22user32%22%20_%3CBR%20%2F%3E(ByVal%20hwnd%20As%20Long)%20_%3CBR%20%2F%3EAs%20Long%3CBR%20%2F%3E%3CBR%20%2F%3EPublic%20Function%20ActivateAccessApp()%20As%20Boolean%3CBR%20%2F%3E'Brings%20the%20DB%20to%20the%20front%20of%20all%20open%20windows%3CBR%20%2F%3EDim%20appTarget%20As%20Access.Application%3CBR%20%2F%3E%3CBR%20%2F%3ESet%20appTarget%20%3D%20GetObject(CurrentDb.Name)%3CBR%20%2F%3EActivateAccessApp%20%3D%20_%3CBR%20%2F%3ENot%20(SetForegroundWindow(appTarget.hWndAccessApp)%20%3D%200)%3CBR%20%2F%3ESet%20appTarget%20%3D%20Nothing%3CBR%20%2F%3E%3CBR%20%2F%3EEnd%20Function%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-321254%22%20slang%3D%22en-US%22%3ERe%3A%20MS%20Access%20force%20a%20popup%20on%20top%20of%20other%20windows%3F%3F%20Is%20this%20possible%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-321254%22%20slang%3D%22en-US%22%3E%3CP%3EIf%20you%20define%20the%20form%20as%20modal%3Dyes%20and%20popup%3Dyes%2C%20then%20it%20will%20be%20on%20top%20of%20Access%20until%20closed.%20It%20will%20also%20be%20on%20top%20of%20other%20applications%20when%20opened%2C%20but%20not%20modal%2C%20i.e.%20selecting%20other%20windows%20will%20send%20the%20popup%20into%20background%2C%20together%20with%20Access.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-314296%22%20slang%3D%22en-US%22%3ERe%3A%20MS%20Access%20force%20a%20popup%20on%20top%20of%20other%20windows%3F%3F%20Is%20this%20possible%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-314296%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F257646%22%20target%3D%22_blank%22%3E%40perrycheng%3C%2FA%3E!%20If%20your%20Database%20is%20open%2C%20you%20can%20get%20a%20pop-up%20form%20as%20a%20single%20window%20with%20some%20vba%20Code.%20Or%20you%20can%20upload%20your%20database%20to%20oneDrive%20to%20see%20the%20connectors%20in%20MS%20FLOW.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20Microsoft%20stopped%20until%20April%202018%20with%20the%20access%20services%20in%20SharePoint%20and%20forced%20us%20to%20migrate%20to%20SQL%20Databases%20in%20Office%20365%26nbsp%3B%20I%20can%20only%20figure%20out%20these%202%20options.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20can%20start%20a%20flow%20with%20your%20access%20database%20in%20OneDrive%20and%20MS%20FLow%2C%20maybe%20you%20can%20send%20an%20e-mail%20notice%20via%20Outlook%20if%20a%20new%20entry%20in%20your%20database%20is%20done.%20Only%20an%20idea.%20Greets%2C%20Eva.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

I am just wondering if there is a way to have access display a popup form (even just a message saying, "hey you got a new entry by an use!"  ON TOP of another window (say, Chrome Explorer, or whatever other windows.

 

Is this possible??

4 Replies
Highlighted

Hello @perrycheng! If your Database is open, you can get a pop-up form as a single window with some vba Code. Or you can upload your database to oneDrive to see the connectors in MS FLOW.

 

As Microsoft stopped until April 2018 with the access services in SharePoint and forced us to migrate to SQL Databases in Office 365  I can only figure out these 2 options.

 

If you can start a flow with your access database in OneDrive and MS FLow, maybe you can send an e-mail notice via Outlook if a new entry in your database is done. Only an idea. Greets, Eva.

Highlighted

If you define the form as modal=yes and popup=yes, then it will be on top of Access until closed. It will also be on top of other applications when opened, but not modal, i.e. selecting other windows will send the popup into background, together with Access.

Highlighted
So, I found a codes below from somewhere, can't remember where. It works! However, it closes all my active forms. I really don't know what this module does for me, so, I don't know how to prevent it from closing my active open forms (it is a module, and then I just call it from an event):

Option Compare Database
Option Explicit
Public Declare Function SetForegroundWindow _
Lib "user32" _
(ByVal hwnd As Long) _
As Long

Public Function ActivateAccessApp() As Boolean
'Brings the DB to the front of all open windows
Dim appTarget As Access.Application

Set appTarget = GetObject(CurrentDb.Name)
ActivateAccessApp = _
Not (SetForegroundWindow(appTarget.hWndAccessApp) = 0)
Set appTarget = Nothing

End Function
Highlighted

@perrycheng Is this still possible?  The code I copied down doesn't seem to do anything.

 

Option Compare Database
Option Explicit
Public Declare Function SetForegroundWindow _
Lib "user32" _
(ByVal hwnd As Long) _
As Long

Public Function ActivateAccessApp() As Boolean
'Brings the DB to the front of all open windows
Dim appTarget As Access.Application

Set appTarget = GetObject(CurrentDb.Name)
ActivateAccessApp = Not (SetForegroundWindow(appTarget.hWndAccessApp) = 0)
Set appTarget = Nothing

End Function