Import Text Files without .txt extension, Update Access Text Registry

gamewarrior48

New member
Local time
Today, 11:52
Joined
Jul 18, 2025
Messages
2
Hello,

I am trying to import a text file that has the .dat extension, which Access does not allow me to import. I am unable to change the suffix due to it being an auto-generated file and I would like my program to run automatically. I came across a from 13 years ago that mentions editing the registry (titled "Import text file without TXT extension), but I was unable to track down the registry mentioned. If anybody has any ideas how I can automatically import this file with vba or sql, please let me know.

P.S. I tried using the following line, but I get an error saying "The action or method requires a Specification Name argument" despite the Microsoft site saying it is optional.
Code:
DoCmd.TransferText acImportFixed, "", "tableName", filePath
P.P.S. I was unable to directly link the post as my post was being marked as spam.
 
You can use FSO or Access to rename the file to .txt so that Access can open it. OR, you can use the standard Open method to open the file. You just can't use the import method.
 

Users who are viewing this thread

Back
Top Bottom