Table of Contents >> Show >> Hide
- What Does Compact & Repair Do in Access 2013?
- Why Access 2013 Databases Get Bloated
- When You Should Compact and Repair an Access 2013 Database
- Before You Run Compact & Repair
- How to Compact and Repair an Open Database in Access 2013
- How to Compact and Repair a Database That Will Not Open Normally
- How to Turn On Compact on Close
- Compact and Repair Is Not the Same as Backing Up
- Common Problems Compact & Repair Can Help With
- What Compact & Repair Cannot Fix
- Best Practices for a Healthier Access 2013 Database
- Advanced Option: Compact from the Command Line
- Final Thoughts
- Real-World Experiences with Compact and Repair in Access 2013
- SEO Tags
If your Microsoft Access 2013 database has started acting like a garage that has not been cleaned since the early Obama years, you are not alone. Access databases have a habit of collecting digital lint. Records get added, deleted, updated, imported, exported, and occasionally bullied by a surprise crash. Over time, that activity leaves behind unused space, temporary clutter, and sometimes mild corruption that makes the file larger, slower, and moodier than it should be.
That is exactly where the Compact & Repair feature comes in. It is one of the simplest and most important maintenance tools in Access 2013. When used correctly, it can shrink file size, improve performance, and fix certain database problems before they turn into full-blown “why is this form suddenly broken?” drama.
In this guide, you will learn what Compact and Repair actually does, when to use it, how to run it in Access 2013, what it cannot fix, and how to keep your database healthy without treating it like an indestructible filing cabinet with a keyboard.
What Does Compact & Repair Do in Access 2013?
In plain English, Compact & Repair rebuilds the database file. As Access rewrites the file, it removes unused space left behind by deleted objects and temporary data, reorganizes internal storage, and attempts to correct certain kinds of structural problems. The result is often a smaller, cleaner, and more stable database.
That matters because Access does not always return freed space to the operating system the moment you delete records or remove objects. So even if your tables look leaner, the file itself may still be carrying yesterday’s baggage. Compacting is how Access finally takes out the trash instead of just shoving it behind the couch.
Repair is the second half of the job. If the file has minor inconsistencies, Access may be able to correct them during the rebuild. That can help with symptoms such as sluggish performance, odd errors, or a database that opens but behaves like it woke up on the wrong side of the ribbon.
Why Access 2013 Databases Get Bloated
Deleted data does not always shrink the file
Deleting records sounds tidy, but Access often keeps the file space reserved until you compact it. That means a database can keep growing even when you are actively cleaning it up.
Temporary objects leave residue
Access creates temporary internal objects while it processes forms, queries, reports, and other operations. Most of the time that is fine. Over time, though, those leftovers can contribute to file growth and slower performance.
Design changes add churn
Editing forms, reports, macros, and VBA modules can also add overhead. A database that has been “improved” fifty times by six different people often ends up heavier than one that was designed once and left alone.
Shared network use raises the risk of corruption
If several users work directly in the same Access file over a network, the chance of corruption goes up. That does not mean doom is guaranteed, but it does mean the database deserves better than a shrug and a weekly prayer.
When You Should Compact and Repair an Access 2013 Database
You do not need to run Compact & Repair every time you blink, but you should use it regularly and strategically. Good times to run it include after a large batch import, after deleting lots of records, after making major design changes, after a crash or forced shutdown, or when the database suddenly feels slower than a Monday morning.
It is also smart to compact a database when its file size has grown suspiciously large. Access databases have a hard size ceiling, so file bloat is not just messy; it can become a real limitation.
For many teams, a periodic maintenance schedule works best. Monthly may be enough for light use. Weekly may be better for active databases. Daily can make sense for local front-end files that change constantly. The right answer depends on how often the file is edited, how many users touch it, and whether the database lives quietly on one PC or in a busier shared environment.
Before You Run Compact & Repair
1. Back up the database first
This is not optional if the data matters. Compact & Repair is helpful, but it is still a major file operation. If the file is already damaged, the process can recover a lot, recover a little, or leave you wishing you had made a backup thirty seconds earlier. Save a backup copy before you run the tool, especially on a database that is showing signs of corruption.
2. Make sure nobody else is using the file
Access needs exclusive access to run Compact & Repair properly. If another user has the database open, or if a front-end is still connected to a shared back-end, the process may fail or throw an exclusive-access error. In multiuser environments, communicate before maintenance. Databases do not appreciate surprise renovations while people are still inside the house.
3. Confirm you have enough permissions
You need sufficient rights to the database file and folder. If the database is stored on a network share, limited permissions can block the process or prevent Access from writing the compacted copy.
4. Check available disk space
Because Access creates a rebuilt copy during the compacting process, having enough free space is simply good sense. If the drive is nearly full, you are making life harder for the repair before it even starts.
How to Compact and Repair an Open Database in Access 2013
- Open the database in Access 2013.
- Click File.
- Select Info.
- Click Compact & Repair Database.
Access will create the compacted and repaired copy in the same location. In many cases, the process is quick. If the database is large or a little beat up, give it time and do not interrupt it unless you enjoy avoidable problems.
How to Compact and Repair a Database That Will Not Open Normally
Sometimes the database is too cranky to open directly. Access 2013 still gives you a way in through the side door:
- Start Access 2013 without opening the damaged database.
- From the templates screen, open a blank database.
- Click File, then Close.
- Go to Database Tools.
- Click Compact and Repair Database.
- Browse to the problem file and select it.
If Access detects corruption when you try to open a file, it may prompt you to compact and repair automatically. Say yes. That is one of the few times in life when letting the software take the first swing is reasonable.
If the repair is only partly successful, Access may create a system table called MSysCompactErrors. That table can help you identify which objects did not survive the process cleanly. In other words, it is the database equivalent of a hospital discharge summary.
How to Turn On Compact on Close
Access 2013 also lets you compact a database automatically whenever it closes. That setting applies only to the current database, not every Access file on your computer.
- Open the database.
- Click File > Options.
- Select Current Database.
- Under Application Options, check Compact on Close.
- Click OK.
- Close and reopen the database so the setting takes effect.
This option is handy for a local front-end file or a single-user database. It is less charming for a shared multiuser database, where automatic compaction can interrupt availability or lead to conflicts. In shared environments, it is usually smarter to compact on a schedule and keep users out during the process.
Compact and Repair Is Not the Same as Backing Up
This is where many people get overconfident. A compacted database may be cleaner, but it is not a substitute for a backup. If corruption has already damaged an object, compacting may not fully restore it. A real backup gives you a fallback point. Compacting gives you maintenance. You want both.
Access 2013 includes a backup option under File > Save As. Use it before repair work, before big structural changes, and before you let anyone say, “I only changed one tiny thing.” That sentence has launched many regrettable afternoons.
Common Problems Compact & Repair Can Help With
Large file size
If your database size keeps rising even after cleanup, compaction often reclaims unused space and brings the file back down to something more sensible.
Slow performance
Forms that open slowly, queries that feel sluggish, and reports that take longer than usual can all improve after a compact, especially if the file has not been maintained in a while.
Minor corruption
Small inconsistencies in the file structure may be fixed during repair. This is particularly useful after an improper shutdown, a crash, or flaky network behavior.
General weirdness
Yes, “weirdness” is a technical term in the real world. If the database suddenly behaves oddly for no obvious reason, compacting is one of the safest first maintenance steps.
What Compact & Repair Cannot Fix
Compact & Repair is useful, but it is not magic. It cannot solve bad database design, poor indexing choices, giant attachment abuse, unreliable networks, or years of multiuser misuse all by itself. It also cannot turn an Access file into a full enterprise platform just because you whisper encouraging words at it.
If your database is approaching the Access size limit, compacting may buy you some breathing room, but it will not remove the ceiling. Access databases are limited to 2 GB, minus system-object space. If you are flirting with that line, the long-term fix may be to split the database, link tables in multiple back-end files, reduce attachments, archive old data, or migrate heavy data storage to SQL Server.
Best Practices for a Healthier Access 2013 Database
Split the database
In a multiuser setup, keep the tables in a back-end database and give each user a local front-end copy containing forms, queries, reports, and code. This reduces corruption risk and makes maintenance far more civilized.
Compact local front-ends regularly
Front-end files change often because forms, temporary objects, and compiled code can create overhead. Compact on Close can make sense here.
Compact back-end files during off-hours
Do this only when no one is connected. A quiet maintenance window beats a midday collision with active users.
Keep backups on a schedule
Do not rely on human memory. Human memory is how you end up saying, “I thought Greg backed it up,” while Greg is on vacation.
Watch file size and attachments
Attachments can make an Access file balloon fast. If your database stores lots of images or documents, you may need a different storage strategy.
Advanced Option: Compact from the Command Line
Access also supports command-line compaction, which is useful for scripted maintenance or off-hours jobs. A simple example looks like this:
msaccess "C:DataYourDatabase.accdb" /compact
This can be helpful in admin workflows where you want maintenance to run at night or during low-usage windows. Just remember that automation does not cancel the need for backups, exclusive access, or common sense. A scheduled mistake is still a mistake. It is just punctual.
Final Thoughts
If you use Access 2013, learning to compact and repair your database is not optional trivia. It is core maintenance. The feature helps control file bloat, improves performance, and reduces the odds that minor problems turn into serious ones. Back up first, make sure users are out, run the tool regularly, and treat Compact & Repair as part of your normal database care routine rather than a panic button you press only after the smoke starts rising.
In short, Compact & Repair is not glamorous. Neither is flossing, but both are cheaper than major surgery.
Real-World Experiences with Compact and Repair in Access 2013
In real-world Access 2013 environments, the biggest surprise is often how much space a database can reclaim after routine cleanup. A small business might delete thousands of old invoice records, remove unused temporary tables, and assume the file should instantly shrink. Then they look at Windows Explorer and the file size has barely changed. That is usually the moment when Compact & Repair stops sounding like a boring maintenance checkbox and starts looking like a minor miracle. After the compact, the database may drop dramatically in size and feel faster right away. It is not magic, but to a manager who thought the file was broken, it certainly feels like it.
Another common experience shows up after an unexpected shutdown. Maybe a user closed a laptop before Access finished writing data. Maybe the network connection dipped at exactly the wrong moment. Maybe Windows decided it was a fabulous time to install updates. Whatever the cause, the next person opens the file and suddenly forms act strangely, VBA behaves badly, or Access prompts for repair. In many of those cases, Compact & Repair is the first practical response. Sometimes it clears the issue completely. Other times it repairs enough of the file to let you open the database, inspect the damage, and restore only the missing pieces from backup. That is why experienced Access users talk about backups with the seriousness of airline pilots discussing landing gear.
Shared databases create their own pattern of stories. Teams often start with one file on a network share and several users opening it directly because it is easy and seems to work fine at first. Then the cracks show. One person leaves the file open during lunch. Another loses connection briefly. Someone else complains that a form will not save because exclusive access is unavailable. In that kind of setup, Compact & Repair still helps, but it also reveals a larger design issue. Many admins eventually move to a split database model with a shared back-end and local front-end copies. Once they do, maintenance becomes smoother, corruption complaints drop, and Compact on Close makes more sense for the local front-ends.
There is also the experience of using Compact on Close in the wrong place. On a single-user database, it can feel wonderfully automatic. Close the file, let Access tidy up, move on with your day. But on a busy shared file, it can become the software equivalent of locking the grocery store every time one customer leaves. That is why seasoned Access users tend to be selective. They love Compact on Close for local files and development copies, but they are far more cautious with shared production databases.
And then there is the classic “we are close to 2 GB” moment. Compact & Repair may buy time, especially if the file is bloated with unused space, but it also forces a hard conversation. If the database stores large attachments, years of history, or multiple users’ data in one growing file, compaction is maintenance, not a growth strategy. Experienced teams usually use that moment to archive old data, split the back end, or move heavier workloads to a more scalable platform. In other words, Compact & Repair is often the tool that solves today’s problem and politely points at tomorrow’s architecture decision.