Hello,
Here is what I would like to do:
I'm familiar with Access, but am very new to coding. Here is where I've gotten:
Sub ImportMod()
Dim f As Object '//File Object
With CreateObject("Scripting.FileSystemObject")
For Each f In .GetFolder("C:\ImportDir").Files
DoCmd.TransferText acImportDelim, "BufferDump", "ImportFile", f.Path, True 'import file
DoEvents 'don't take over all of the PC resources
Next f
End With
End Sub
Right now, all it does is look in a folder and import every single txt file in that folder and puts the data into a table called "ImportFile".
I would appreciate any help or direction. Thanks!!!
Here is what I would like to do:
- Select a folder with multiple txt files (new txt files will be added weekly)
- Import NEW txt files (i.e. txt files that have not been imported before)
- Append the new txt files to an existing access table
I'm familiar with Access, but am very new to coding. Here is where I've gotten:
Sub ImportMod()
Dim f As Object '//File Object
With CreateObject("Scripting.FileSystemObject")
For Each f In .GetFolder("C:\ImportDir").Files
DoCmd.TransferText acImportDelim, "BufferDump", "ImportFile", f.Path, True 'import file
DoEvents 'don't take over all of the PC resources
Next f
End With
End Sub
Right now, all it does is look in a folder and import every single txt file in that folder and puts the data into a table called "ImportFile".
I would appreciate any help or direction. Thanks!!!