Large .mdb File

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
 
D

Dirk Goldgar

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.
 
D

Dirk Goldgar

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top