how to create an import spec



I'm still trying to automate importing a csv file into my database to display
both numbers and letters in a field. Currently only the numbers are being
displayed in my table.

I've checked the table format and it is correct (text). I've been told to
create a specification name for the transfertext command.

The research I've done says to create it using the Import Wizard; which I
have done. I have inserted the spec name into the transfertext command but
when I run the code, I get the following error message:

The text file specification "DeptID" does not exist. You cannot import,
export, or link using the specification.

FYI.........Following is the command I'm using to import the csv file:
DoCmd.TransferText acImportDelim, "DeptID", "DeptID_Data", Location, False

Any suggestions on this issue would be greatly appreciated. Thanks for the


when you created the import specification, did you set the data type of that
field to Text *in the specification*?
and did you save the Specification, before exiting the wizard? to do that,
you had to click the Advanced button in the wizard, and then the Save As
button. if you successfully saved the Specification, you should be able to
open the import wizard again, click the Advanced button, then click the
Specs button, and see the name of the saved Specification.


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question