Field "F1" Does not Exist



I am attempting to import a comma delimited text file
into an Access table using a macro using the "Transfer
Text" action. I receive an error that
states, "Field "F1" does not exist in destination
tabel..." and that my destination table must conatin the
same number of fields as the import.

To test this, I imported the comma delimited records
using the File, Get External Data, Import function
assigning the same table as the destination table. The
import worked perfectly so I know the table is set up

Why will this data not import using the macro but will
using the File, Import function?

Thanks for your help.


Ken Snell

Are you using a specification for the TransferText, and does that
specification tell ACCESS to use its own primary key (i.e., an autonumber
field)? If yes, ACCESS is looking for an autonumber field in the table.

If this isn't the issue, then you'll need to to give us much more
information about the file structure, the table structure, the actual macro
action with arguments that you're using, etc. We're flying blind otherwise!


I am using the TransferText function but not the
specification. I am not using an autonumber field. I
have entered the following text in the Macro:

SetWarnings = No
RunCode (Run VB code to clear all content of the table)
TranferType: Import Delimited
Table Name: PlannedOrderImport
File Name: G:\Scheduler DSS\Inputs\plannedOrder.txt
Has Field Names: No

The *.txt file doesn't include column titles and IS comma
delimited. The table includes about 20 columns. I can
enter the data by hand without issues also. It's just
when I use the Import Delimited function that I get the
F1 error.

Hope this is enough information.



I have noticed this. When I add headers to the *.txt
file and use headers duing the TranferText function, I
can import the data without error only when the table
field names are the exact names of each column's header
name in the import file. So I know the import can work
and that the "import to" table field types are correct.
But when I get rid of the headers in both the *.txt file
and in the TransferText function, I receive the F1 error

Ken Snell

I haven't had a chance to test this yet, but it may be that the default for
ACCESS when you're not using a specification is to assume that there should
be an autonumber field named F1 in your destination table. Try creating an
Import Specification that clearly identifies the fields that you're
importing (do this manually by starting the import process, and in the
wizard window, click the Advanced button on bottom left; enter all
appropriate info, then save the specification using some name; then cancel
the rest of the import). Then use this secification as the Specification
argument in the TransferText action.


THAT WORKED! I created a specification for the import
and that fixed my issue. Thank you again for all your


Gregg Horwitz

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