Slow Code
- From: Ernst Guckel <ErnstGuckel@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 4 May 2008 19:03:01 -0700
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
.
- Follow-Ups:
- Re: Slow Code
- From: Albert D. Kallal
- Re: Slow Code
- Prev by Date: Re: problem getting a value from Date()
- Next by Date: SQL Not Updating
- Previous by thread: Textbox entry to retrieve associate table field values
- Next by thread: Re: Slow Code
- Index(es):