Slow Code



Any ideas why this runs slow?? Is there a faster way??

'Process Archives for old or missing data
For i = 0 To DateDiff("d", dStartDate, Now())
strSalesDate = Format(dStartDate + i, STRING_IMPORTDATE)
strPath = strStoreNumber & "_" & strSalesDate

If Not IsNull(DLookup("[Sales]", TABLE_SALES, "[SalesDate] = " &
Format(dStartDate + i, STRING_DATE))) Then
GoTo Looping
End If

strFileSource = STR_ARCHIVEPATH & "\" & strPath & "\" & STR_SOURCESALES

strCaption = "Importing - " & Format(dStartDate + i, "dd-mmm-yy")

With Forms("frmImport")
.Controls("lblStatus").Caption = strCaption
.Repaint
End With

For t = 1 To 10
Next

FileCopy strFileSource, strFileDest

Thanks,
Ernst.


DoCmd.SetWarnings (False)
DoCmd.TransferText acImportDelim, STR_IMPORTSALES, TABLE_SALES,
strFileDest
DoCmd.SetWarnings (True)

Looping:
Next

.