Results 1 to 6 of 6
  1. #1
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365

    Compact from Code and 'Not Responding' alert


    Can I compact and repair from an instruction in code, rather than clicking the ribbon ?

    While looping through a large array access will report "Not Responding" at top of screen. But it is actually doing what's it told
    and eventually completes and all is ok. Can the 'Not Responding" alert be prevented or hidden ?

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,803
    Don't think it can be hidden unless you go the route of hiding the application window, and even then, not sure. I wouldn't worry about it if you're the only user because all it means is that "I'm busy doing what you asked me to do, so stop poking around or asking for something else until I'm done." It's not a crash thing, or an error of any kind.

    OK, one exception about something that may provide some relief is to make sure your query or other operation is as efficient as it can be, or parse it into tasks. I doubt there is an API for working with an array, but if there is, that might help.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,979
    Can I compact and repair from an instruction in code, rather than clicking the ribbon ?
    No. The functionality to do this on an open database was removed with Access 2010
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  4. #4
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365
    Thanks for the replies

  5. #5
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,803
    an I compact and repair from an instruction in code, rather than clicking the ribbon
    I didn't necessarily think OP meant while open. You're saying you can no longer compact and repair via vba code upon closing? I thought that was possible around 2013.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,979
    OK for completeness, there are four possible methods of compacting a file
    1. From the ribbon whilst open
    2. Using the Compact on Close setting in Access Options (not recommended)
    3. Opening the file using the /compact command line switch
    4. Using code on another closed database

    At one stage, you could also compact an open database using SendKeys but I believe that is no longer possible either.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Null value not responding in VBA Code
    By George in forum Access
    Replies: 4
    Last Post: 02-08-2018, 07:43 PM
  2. Compact & Repair Code
    By aamer in forum Access
    Replies: 6
    Last Post: 11-04-2014, 03:51 PM
  3. trying to compact code
    By trevor40 in forum Programming
    Replies: 9
    Last Post: 03-17-2014, 09:04 AM
  4. Replies: 7
    Last Post: 11-22-2013, 07:32 PM
  5. Alert Message Code Problem
    By 10 Gauge in forum Forms
    Replies: 1
    Last Post: 03-15-2011, 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