Large .mdb File

  • Thread starter Thread starter Scott
  • Start date Start date
S

Scott

I have created a database that uses a macro to import 8
dBase IV files into tables and export them as fixed-width
text files. I have noticed that eventhough I delete the
tables after I export them using DeleteObject at the end
of the macro, the .mdb file that does all of this is very
large. The dBase files that I am using are somewhat
large, too, but I figured that the .mdb file would go down
in size once the data was deleted out of it.

Any ideas? Is this normall? How do I make the file the
size that it was when I created it without harming the
macro inside?

TIA

Scott
 
Scott said:
I have created a database that uses a macro to import 8
dBase IV files into tables and export them as fixed-width
text files. I have noticed that eventhough I delete the
tables after I export them using DeleteObject at the end
of the macro, the .mdb file that does all of this is very
large. The dBase files that I am using are somewhat
large, too, but I figured that the .mdb file would go down
in size once the data was deleted out of it.

Any ideas? Is this normall? How do I make the file the
size that it was when I created it without harming the
macro inside?

Space once used isn't reclaimed until you compact the database. To do
that, use menu items Tools -> Database Utilites -> Compact and Repair
Database.
 
Scott said:
Is that [compacting] something that can be done automatically at the
end of my macro?

Yes, though it requires VBA code which may be more or less complicated
depending on the version of Access you are running. If you're running
Access 2000 or later, you can also set an option to have the database
automatically compact itself whenever you close it, which may be
simpler. Let me know what you want to do, and what version of Access
you're running, and I'll try to get you set up.
 
Back
Top