Wierd problem with DoCmd.TransferText acImportDelim

stephengrenfell

Registered User.
Local time
Today, 17:39
Joined
Jul 1, 2009
Messages
19
I have a small script that imports from a CSV file into a table in A2007.

Code:
Private Sub cmdImportColisRefSendEmail_Click()
DoCmd.RunSQL "Delete * FROM Colissimo_envoye"       ' empty the sent colissimo table
DoCmd.TransferText acImportDelim, "Import-colissimo-colis-ref Specification", "Colissimo_envoye", "C:\Users\Stephen\Future Innovations\Pet Porte\Orders-SC\colissimo envoye.CSV", True
DoCmd.OpenQuery "ColisRefToInvtbl"                 ' Add the Colissimo REf into the Orders Table
Call ReportToOutlookBody
End Sub

If I run the "Import-colissimo-colis-ref Specification" specification manually from the Saved Imports Wizard it works fine. However if I run the VBA script above it always ignores the first line in the CSV file. I have checked the contents of the CSV file in Notepad / Excel, and tried using different values - running the VBA sub always ignores the first row.

Any help / ideas appreciated.

Thanks
 

Users who are viewing this thread

Back
Top Bottom