As long as the database (that you want to compact) is not open and in use you can use
DBEngine.CompactDatabase
Check usage in help but basically you need to give it the database source and the target
You will need to rename the target to the source to continue using it as before.
-- Slainte
Craig Alexander Morrison Crawbridge Data (Scotland) Limited "Harry V" <HarryV[ at ]discussions.microsoft.com> wrote in message news:E2E2AD50-7660-40D0-B49B-D4BC3F4245B3[ at ]microsoft.com...
[Quoted Text] > Craig, > > Is there a way of doing this programatically, say as a form is opened? > > Harry V > -- > Harry E Vermillion > IT2 > Division of Wildlife > State of Colorado > > > "Craig Alexander Morrison" wrote: > >> Compact the database. >> >> -- >> Slainte >> >> Craig Alexander Morrison >> Crawbridge Data (Scotland) Limited >> "Harry V" <HarryV[ at ]discussions.microsoft.com> wrote in message >> news:6A344A2E-3430-4DAC-A4B4-D0C495D3DCFD[ at ]microsoft.com... >> > I'm using Access 2002 and I'm wondering if there isn't a way to refresh >> > all >> > the indexes to a table? >> > -- >> > Harry E Vermillion >> > IT2 >> > Division of Wildlife >> > State of Colorado >> >> >>
|