CSV import into table not working...?

  • Thread starter Thread starter paul814
  • Start date Start date
P

paul814

I'm trying to use this command to import a CSV file into a table...

DoCmd.TransferText acImportDelim, "RetSpec", "tblRet", "\\drake\subcon
\ret\data\ret.csv", False

it never does it...any ideas?

If I do a straight import using those Specifications "RetSpec" tblRet
is poppulated with the data from the CSV file without any problems.

Right above the DoCMD i have:
On Error GoTo BadImport

and BadImport is:
BadImport:
MsgBox "Ret data was NOT imported!!", vbOKOnly, "File Import
Problems"
Exit Sub

Any ideas? I always get my BadImport error.
 
Paul,
when you say a straight import does succeed - do you mean if you use the
wizard it imports successfully?

Change your error handling to show the error number and its message like
this:

BadImport:
MsgBox Err.Number & " " & Err.Description

This will give you a better idea of what the error is and that is a step
towards fixing it.

Jeanette Cunningham
 
Back
Top