You have now been introduced to ACCESS file "bloat". You see the .mdb file continually is growing. During the processing of your data there are temp files and tables that are growing all the time. Even if you create a table, use it, then delete it the disk space for that table has been alloted to this database and now represents empty space in your file. Deleted records don't make the database smaller. There is just a blank spot in the file that ACCESS doesn't use over again. So, what is the answer to this problem.
It is the necessity to Compact the database periodically. This can be done in Design View. Select Tools Menu, Database Utilities, and then Compact Database. After running this utility the database will be compacted down without any empty or dead space. This should be done as needed. Different databases grow faster than others and you will just have to determine how often you want to compact it.
There are other methods to perform this activity also. If you are using A2k or higher you can make a setting in your
Tools/Options/. . . Compact On Close check box. Just check this box and everytime the database closes ACCESS performs a compact.
These above examples are compacting the front-end database. If you have a front-end and back-end design to your database the above will only compact your front-end databases. The back-end(tables) will have to be compacted through the first option above or an administrative process using a Short Cut setup to perform the compact.
Example: Shortcut Command-Line
Code:
"c:\program files\microsoft office\office\msaccess.exe" "G:\ . . pathto db .\db.mdb" /compact
This shortcut can be placed on the Adminstrator's PC so that periodically they can compact the server backend database.
One final note. To compact a database all users must be logged off and not accessing the server database.
Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]