Text File Import - mindboggling error

Jemmo

Registered User.
Local time
Today, 00:48
Joined
Jul 28, 2008
Messages
82
I have a macro that imports a text file (to a table).

However, I am getting an error message back;

'You cannot import a textfile unless it has one of these extensions: TXT, CSV, TAB, ASC, TMP, HTM, HTML.'

Has anyone come across this before?

As far as I can tell the macro is pointing to the correct directory and the text file specified exists.

(Am running Access 11.6 on Windows XP SP2)
 
What macro action are you using and what extension does the file actually have?
 
the transfer part of the macro is as follows;

TransferText
Transfer Type = Import Fixed Width
Specification Name = DI033 File Spec
Table Name = tblDI033_DATA
File Name = C:\documents and settings\All Users\Documents\Databases\DI033 Duplicates\Input\InputFile.txt to tblDI033_DATA
Has Field Name = No

I have Windows XP but the despite the file type showing as 'Text File', the file extension is not displayed and there is no option in the 'Choose details' pop-up to show the file extension.
 
If you open up windows explorer (or My Computer)
goto Tools
goto Folder Options
goto View (tab)

Uncheck "Hide file extensions for known file types"

This will show you the extentions on your files.
A txt extension is probably not the only one that can be read by notepad.

Hope this helps.
 
Thanks guys - sorry for not getting back sooner but been dealing with other issues elsewhere.
I have got around this with some VBA that looks for any files with a .txt file extension and imports all such files.
 

Users who are viewing this thread

Back
Top Bottom