TransferText without an import spec

BenH

Registered User.
Local time
Today, 13:04
Joined
Oct 31, 2008
Messages
25
Having probs with this. Want to use this to import without an import spec.

I've tried;

DoCmd.TransferText acImportDelim, "", tbl7480Errors, str7480ErorrsPath, True

and also

DoCmd.TransferText acImportDelim,, tbl7480Errors, str7480ErorrsPath, True

And it just keeps saying "The action or method requires a table name argument", but the table name's there.

I do not want to create an import spec - MS's documentation is clear that this can be omitted where the file is delimited.

It's a CSV file, and the table has been created already.

Please advise.
 
At the top of the module where your DoCmd.TransferText-thing is, write Option Explicit. Then your mistake will become obvious.
 
done that, get a slightly different error, still none the wiser!
 
OK, I needed " " around the table name, but now I get "field NoName does not exist in destination table.

DoCmd.TransferText acImportDelim, , "tbl7480Errors", str7480ErrorsPath, True
 
I suspect that Access is not lying :) Does it exist?
 
The table you are importing into does not contain the fields you are importing. Try running without the table existing and it will be created.
 

Users who are viewing this thread

Back
Top Bottom