Results 1 to 5 of 5
  1. #1
    JAH is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2015
    Location
    State College, PA
    Posts
    6

    How can disk space be reclaimed following the deletion of tables and forms


    I developed an Access DB to keep track of activity at a local animal shelter. It imports spreadsheet data on the dogs coming into our shelter as well as the applicants who adopt them. Unfortunately, after about 4 years the database exceeded the 2GB limit. My first step was to use the existing tools to compress the file which did nothing to reduce the size. I then deleted several tables, forms, and reports, opened a new database and imports the remaining components, and compressed again; still no reduction in disk space utilization. My question is, how can I get the database down to a useable size?

  2. #2
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845
    1 you should split your database - tables in the backend (BE) and forms, queries, reports and modules in the front end (FE) - see the 'Access Database' splitter on the database tools tab

    2 next you need to decompile the new front end - see this link on how to do this -

    http://www.access-programmers.co.uk/...ight=decompile

    post #4 is probably the easiest. The front end will now be as small as it can be and should not change in size (unless you have temporary tables - see below)

    3. now compact the back end - again it will be as small as it can be

    4. if it is still around the 2gb limit, you need to divide the BE into two or more databases. Base which tables go to which database on common relationships (for example customers, addresses, contacts in one table, invoice header and invoice detail in another).

    All of the above does not require any code, just rearranging what you already have.

    For regularly incrementing data (such as invoices) you may need to consider creating an archiving process which will no doubt require some code - google 'access archiving' or similar to find a solution to meet your needs

    If you use temporary tables, these are better in a separate temporary database. You may need some code to create and delete the database as required - google 'access vba create database' to find suggested code

    finally you should compact and repair the BE on a regular basis - frequency depends on how often the BE is updated but would suggest a minimum of once a month.

    I note you are using Access 2007 - if a db reaches 2gb and fails, compact will work for a .accdb but not for a .mdb. Personally I would upgrade a .mdb to a .accdb, but if it has already failed, you will need to create a new db of either flavour, then import the tables

    Finally if all your data totals 2gb of space and you don't want to have multiple backends and don't want to archive, consider migrating the back end to sql server express which is free and has a 10gb limit (on your current growth that should give you about another 16 years). this may well require changes to code but in the first instance you can use the SQL Server upsizing wizard on the database tools tab. Again, google 'upsizing access to sql server' or similar to find out what issues you may face and suggested solutions/workarounds. Note that multivalue, calculated and attachment type fields cannot be upsized.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    Deleting objects and data then running Compact & Repair should result in some reduction in file size - but maybe there just wasn't enough to be noticeable.

    I put temp tables in frontend - the tables are actually permanent, their data is temporary.
    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.

  4. #4
    JAH is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2015
    Location
    State College, PA
    Posts
    6
    Ajax,

    Thank you for both your input and speed of response. I have to go out of town for a week but will try your suggestions as soon as I get back and let you know how it works out.

    Jim

  5. #5
    JAH is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2015
    Location
    State College, PA
    Posts
    6
    Ajax,

    Thank you very much. Your recommendation worked like a charm and the split database is working as originally intended. One thing I had to do was delete all of the temporary tables before the split function could work since those tables dad no keys.

    Thanks again.

    Jim

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

Similar Threads

  1. Replies: 2
    Last Post: 06-11-2015, 08:42 AM
  2. Disk Out of Space Error
    By shabar in forum Import/Export Data
    Replies: 2
    Last Post: 02-18-2013, 11:21 PM
  3. disk space or memory error
    By Cmitchell in forum Database Design
    Replies: 1
    Last Post: 04-04-2011, 03:36 PM
  4. Replies: 1
    Last Post: 02-22-2011, 11:14 AM
  5. Replies: 3
    Last Post: 05-30-2009, 12:30 PM

Tags for this Thread

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