Mysterious problem

  • Thread starter Thread starter Grodon
  • Start date Start date
G

Grodon

I'm encountering a weird problem - when running a macro
that performs a TransferText function, I'm getting the
following error message: "The Microsoft Jet database
engine could not find the object 'DataToImport.txt'. Make
sure the object exists and that you spell its name and the
path name correctly."

I've got the path name and file spelled correctly, they
both exist on the computer and I'm able to open that file
using Windows Explorer. This macro has worked every month
until now, and nothing has changed on the computer. Its
running Access version 2002 and Windows2000.

I've tried changing the path that TransferText looks for
the file to the C drive (instead of a network drive) but
that doesn't work either.

Can anyone shed some light on this?

Thanks in adv.
Grodon
 
Hi Grodon,

Are you experiencing this problem with just this one file, or are you
now unable to import files that you previously exported successfully?

If the file has an unusually long name, try shortening it so the total
length of the path and filename is less than 64 characters (this may be
superstition<g>).

As a general rule, if most text files can be imported but one or some
can't, the problem is in the structure of the file (Access 2002 is very
fussy about this). If you can't import any text files, something has
probably gone wrong with the computer (possibly a registry entry).
 
Thanks. This is happening with all text files. When I
used Windows Explorer to view the file to be imported, it
was listed as ImportFile.txt

When I went into Access and tried to import the text file
manually, I noticed that the .txt extension was listed
twice (ImportFile.txt.txt). I changed it here to have
only one extension.

Not sure why this was the case, but when I changed the
name in Access, it imported correcly. I don't know what
was causing this, when the text file was originally named,
it was given only one extension. I will check the
registry entries, as you suggest.

So the problem is not really solved, but I did get around
it.

Thanks,
Grodon
-----Original Message-----

Hi Grodon,

Are you experiencing this problem with just this one file, or are you
now unable to import files that you previously exported successfully?

If the file has an unusually long name, try shortening it so the total
length of the path and filename is less than 64 characters (this may be
superstition<g>).

As a general rule, if most text files can be imported but one or some
can't, the problem is in the structure of the file (Access 2002 is very
fussy about this). If you can't import any text files, something has
probably gone wrong with the computer (possibly a registry entry).

I'm encountering a weird problem - when running a macro
that performs a TransferText function, I'm getting the
following error message: "The Microsoft Jet database
engine could not find the object 'DataToImport.txt'. Make
sure the object exists and that you spell its name and the
path name correctly."

I've got the path name and file spelled correctly, they
both exist on the computer and I'm able to open that file
using Windows Explorer. This macro has worked every month
until now, and nothing has changed on the computer. Its
running Access version 2002 and Windows2000.

I've tried changing the path that TransferText looks for
the file to the C drive (instead of a network drive) but
that doesn't work either.

Can anyone shed some light on this?

Thanks in adv.
Grodon

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 
Back
Top