An error occurred trying to import file 'c:\temp\import.txt'. The file was not imported.

M

M Skabialka

I have a 7 year old database which is populated from a text file. Each
month a new set of data arrives, and users import the text file using the
import wizard. This worked on Access 2000, XP and 2003, but is not working
in Access 2007. The database was not converted to 2007 though a few code
changes were made because of security warnings.

Steps are: External data, Text file, browse to import.txt, append a copy to
tblIndex, delimited, other |, import to tblIndex, finish
Error: Import Text Wizard: Invalid argument. OK
Import Text Wizard: An error occurred trying to import file
'c:\temp\import.txt'. The file was not imported.
The import errors table shows that there is a 'Null value in an auto-number
field' in the ID field.

I tried importing into a new table and it added an autonumber into the first
column.
So I moved the autonumber ID field into the first column of tblIndex,
instead of the last field.

Now the error says:
Import Text Wizard: You cannot record your changes because a value you
entered violates the settings defined for this table or list (for example, a
value is less than the minimum or greater than the maximum). Correct the
error and try again. OK
Import Text Wizard: An error occurred trying to import file
'c:\temp\import.txt'. The file was not imported.

There are no validation rules in tblIndex. I get the same error when I try
to import index.txt files from last year, when they worked properly in
Access 2003.

REVISION TO THE ABOVE SCENERIO:
Looking at the table I realized there was new data appended. Trying all the
steps again I found out that the original import with the ID field as the
last column did actaully work - even though the error messages indicated
otherwise. I put the ID field back at the end, deleted the new records,
then imported as shown above with the same error messages showing up.
However the data was imported correctly and the ID field has populated
correctly with autonumbers.
If so, why the error messages? IS this an Access 2007 glitch?

Mich
 

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

Top