Results 1 to 7 of 7

Close or Minimize Query Form after Click

  1. #1
    MichaelA is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2019
    Location
    Wisconsin
    Posts
    71

    Close or Minimize Query Form after Click

    I created a form that sets criteria and runs a query. When the query opens up, it opens in the background behind the form. Is there a way to make the query results pop up in front or close/minimize the form so the query results are in the front?



    Thank you!

  2. #2
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    2,003
    If you're using VBA to open the query, add this as the next line of code:
    Docmd.close acForm, Me.Name

    Alternativly, if the form is a popup, you can change that to No.

  3. #3
    MichaelA is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2019
    Location
    Wisconsin
    Posts
    71
    I'm just using a command button to run the query.

    Quote Originally Posted by davegri View Post
    If you're using VBA to open the query, add this as the next line of code:
    Docmd.close acForm, Me.Name

    Alternativly, if the form is a popup, you can change that to No.

  4. #4
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    2,003
    I'm just using a command button to run the query.
    Well, OK. Did you try the suggestions?

  5. #5
    MichaelA is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2019
    Location
    Wisconsin
    Posts
    71
    I want the form to pop up, so I did not try that and I'm not sure how to add that code to the button.


    Quote Originally Posted by davegri View Post
    Well, OK. Did you try the suggestions?

  6. #6
    MichaelA is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2019
    Location
    Wisconsin
    Posts
    71
    I figured it out. Thank you! I'm a little tired.

  7. #7
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    2,003
    Glad to help. Get some rest.

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

Similar Threads

  1. Replies: 2
    Last Post: 03-17-2016, 04:52 PM
  2. Replies: 1
    Last Post: 05-26-2015, 10:47 AM
  3. Replies: 4
    Last Post: 10-09-2014, 07:09 PM
  4. Prevent right click on top of form to close
    By bjnorth in forum Access
    Replies: 2
    Last Post: 02-19-2014, 09:48 AM
  5. Form Minimize Issue
    By Tomfernandez1 in forum Forms
    Replies: 8
    Last Post: 05-18-2011, 05:32 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
  •  
Tech Forums: Microsoft Office Forums