Results 1 to 2 of 2
  1. #1
    Aaron5714 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    48

    Access application loses focus when form is closed.

    I have a pop-up form in my database with a "cancel" button on it. The cancel button's OnClick event runs the following code to close the form:



    DoCmd.Close acForm, "frmSearchSupplier", acSaveNo

    The problem is, when the form closes, the Access application itself loses focus, so if another program like Word or Excel is open in the background it shows up on the screen. I have plenty of pop-up forms that use the DoCmd.Close method and I have not experienced this problem before, so I'm not sure what is going on with this one.

    Any suggestions would be much appreciated.

    Thanks.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    Don't know. I don't use the Popup property. Try setting Popup to no and run the code. Does the app still lose focus?
    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.

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

Similar Threads

  1. Form not getting closed at first time
    By vikasbhandari2 in forum Programming
    Replies: 10
    Last Post: 07-20-2012, 01:25 PM
  2. Form Button loses functionality after Save
    By gregu710 in forum Forms
    Replies: 2
    Last Post: 01-17-2012, 05:13 PM
  3. Replies: 4
    Last Post: 08-17-2011, 05:30 AM
  4. Replies: 0
    Last Post: 08-26-2008, 09:22 AM
  5. Access application to Web based application
    By admaldo in forum Access
    Replies: 0
    Last Post: 06-12-2008, 06:22 AM

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