I forgot to post the link, sorry !
how about something like this :
First manually add a txt extension to your file, then start the import wizard and save the Import Specs. Cancel the import.
Remove the extension and run the following code (assuming all the files have the same specs and are imported to the same table.
Sub test()
Dim fso As Scripting.FileSystemObject
Dim strTmpFile As String
Dim i As Long
Set fso = New Scripting.FileSystemObject
With Application.FileSearch
.FileName = "*.*"
.FileType = msoFileTypeAllFiles
.LookIn = "C:\eisims\data"
If .Execute > 0 Then
For i = 1 To .FoundFiles.Count
'create temp text file
fso.CopyFile .FoundFiles(i), .FoundFiles(i) & ".txt"
'import temp file to access
DoCmd.TransferText acImportDelim, "MySpecs", "MyTable", strTmpFile
'delete temp text file
fso.DeleteFile .FoundFiles(i) & ".txt"
Next i
End If
End With
set fso = nothing
End Sub