Results 1 to 3 of 3
  1. #1
    unit91 is offline Novice
    Windows Vista Access 2007
    Join Date
    Mar 2012
    Posts
    11

    What Macro Command To Use to Close Query Results Screen


    Am working with Access 2007. I have built a macro that opens several make table queries and exports the tables to excel spreadsheets. Macro functions properly, however the query results still show in the access database screen. What macro command can I use to close these screens after the action is done? I use the CLOSE command for each query but the results still show in the Access window.

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Suggest you post your code so that it can be evaluated and determine what the issue is.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Not finding example of macro accomplishing this. Probably need a button on a form to close open query objects or manuall close.

    Alternative - don't use macro, use VBA to run the Access query object or execute SQL statements.
    Last edited by June7; 04-19-2012 at 05:27 PM.
    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. Batch Command to Run Macro Crashes
    By dssrun in forum Programming
    Replies: 4
    Last Post: 02-07-2012, 02:11 PM
  2. Replies: 11
    Last Post: 06-05-2011, 09:51 PM
  3. Replies: 1
    Last Post: 02-12-2011, 10:30 AM
  4. run a windodws command from macro
    By broecher in forum Programming
    Replies: 5
    Last Post: 09-12-2010, 04:46 PM
  5. Replies: 0
    Last Post: 08-25-2008, 12:17 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