How to delete records from database to save space?

D

Daniel

Hello,

I need to delete unused data from my database, so I can reduce the
MDB file size. How do I do it?

This is my delete command:

delete from events where events.customerid in (select events.customerid
from events, customers, companies where events.customerid =
customers.customerid and customers.companyid = companies.companyid and
companies.inactivate = 'Y');

After I deleted these records, but the MDB file size does not
change on harddisk.

Thanks.
 
J

John Spencer

You must compact the database after you delete to recover the space.

Look under the Tools menu- probably under the Database Utilities item

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
D

Daniel

John said:
You must compact the database after you delete to recover the space.

Look under the Tools menu- probably under the Database Utilities item

It worked. Thanks, John.

Btw, can I use SQL command to do it? Because I am use C++ to operate
access database.
 
D

Daniel

Daniel said:
It worked. Thanks, John.

Btw, can I use SQL command to do it? Because I am use C++ to operate
access database.
Nvm, I did some search on google, I got my answer. thanks
 
Top