Compact CurrentDB

Mathematician

Registered User.
Local time
Today, 11:59
Joined
Nov 23, 2007
Messages
17
Hi all,

I would like to compact the same database I am working with, using VB.
It shoul to work like this:
sub compact()

DBEngine.CompactDatabase "c:\my.mdb", "c:\my.mdb"

end compact

how to compel VB to compact the same data base where the code is.
I don't want to compact to another location and delete previous name and rename the new one. I just want to compact currentdb.

Thx in advance for any help.

Mathematician
 
I would think this cannot be done.
ie. you cannot compact the DB from where the code is called.
 
Hi -

Search this forum for "TDC". You'll find a number of possible solutions.

Bob
 

Users who are viewing this thread

Back
Top Bottom