Results 1 to 5 of 5
  1. #1
    RogerT is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2014
    Posts
    3

    Script to open an External Application on the background but keep MS Access on foregr


    I am able to open an external application from my access database with scripting. The problem is it becomes the active application (on foreground) and my access is in the background. I would only like it to open on the background and keep my access database on the foreground. How can I accomplish this? Thanks in advance.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,648
    Interesting, I inherited a db that included Excel component for data entry/edit. Seems the problem was Excel opened behind Access and users had to go find it. Very annoying. One reason I eliminated Excel component.

    I don't know if VBA procedure can use API to set focus on an application so I searched Bing: vba api focus application

    Maybe this is adaptable http://support.microsoft.com/kb/186431
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    RogerT is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2014
    Posts
    3
    Thanks for the response, but I don't know if this will work because as soon as I open the external application, I lost focus to access. The only way to go back is to click on the Ms Access icon. What I want is to keep my access database open after the external application is launched.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,648
    Seems I faced that same conundrum in the situation I described. Couldn't bring Excel to front. Gave up. It was a bad design anyway, just reinforced my decision to eliminate Excel component.

    Sorry.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I am pretty sure I have used FindWindowA to do things like minimize and maximize an app I launched, Outlook. I think as long as you do not exit the procedure you could use Access' Window handle to maximize and bring it up front. I think I have done it before. The hard part is getting the handle and just don’t end the procedure with focus on the new app.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 9
    Last Post: 09-27-2013, 01:14 PM
  2. Using external forms as report background
    By mperron in forum Reports
    Replies: 4
    Last Post: 01-05-2012, 03:32 PM
  3. Replies: 10
    Last Post: 09-21-2011, 02:51 PM
  4. Replies: 4
    Last Post: 08-25-2011, 01:59 PM
  5. Appending a table with external script
    By farva in forum Import/Export Data
    Replies: 0
    Last Post: 11-09-2009, 12:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums