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!

COMPACT ACCESS

Status
Not open for further replies.

krieghof

Programmer
Apr 14, 2003
13
GB
How do i compact an Access DB from command line... ie an SQL statement
 
I don't know about how to do it in code, but there is this option which may be of interest to you:


Compact and repair an Access file automatically every time you close it

Compacting does not occur if you close a shared Access database (multiuser (shared) database: A database that permits more than one user to access and modify the same set of data at the same time.) while another user has it open.
[ol][li]Open the Access database or Access project that you want Microsoft Access to compact automatically.[/li]
[li]On the Tools menu, click Options.[/li]
[li]Click the General tab.[/li]
[li]Select the Compact on Close check box.[/li]
[/ol]


Hope it is of some use,


Aubs
 
You could try something like this
docmd.RunCommand acCmdCompactDatabase

Hope this helps
Hymn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top