Question : Compact and repair database

Hi,

I'm running a process which imports a 125 MB file and exports in smaller chunks.

I am just about to automate the process so that it runs through a series of 125 MB files.

I have noticed that when i delete the table containing alll this data, the Access mdb is still around 116 MB until i 'compact and repair database' which brings it down to 200 KB!

I'm a bit concerned about the effect if i am running multiple files (up to 100) consecutively. Should i be applying some code in the process to carry out this process?

Thanks

Andy

Answer : Compact and repair database

           DoCmd.TransferText acImportDelim, , "tblHeight", Application.FileSearch.FoundFiles(i), False

just before that line of code is where you want to create the new mdb from you template and then import into the new file ...

    'delete old converter file if it exists  
    If Len(Dir("C:\Test\Coordinate.mdb")) > 0 Then
        Kill "C:\Test\Coordinate.mdb"
    End If

    'create new converter from your template
    FileCopy "C:\Test\CoordTemp.mdb", "C:\Test\Coordinate.mdb"
Random Solutions  
 
programming4us programming4us