Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using VBA to compact a Dbase

Status
Not open for further replies.

davisto01

MIS
Jul 11, 2003
21
US
In VBA:
How would I go about compacting the entire database after "DELETE * FROM Update_Table1"-ing thousands of records?
Is there a simple command?

Thanks
TD
 
Use this function

DBEngine.CompactDatabase "Northwind.mdb", "NwindKorean.mdb"
 
Do you have a full sample? There are about 4 of 5 arguments and I don't quite see how they all peice into the subroutine.

 
This Command works fine.

It compacts the database into a new database.

Essentaily Microsoft Comapcts the Database to db1.mdb and then renames it to the current name.

I ran this and then close the Database rename the compacted database to the current name and then open it again with the same script.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top