Hello,
I'm having some problems importing a text file into a specific table in Access. The table already has field names. And there will be multiple text files within the folder I'm using. All the files in the folder will be named similarly. For example TEST_EEAF1, TEST_EEAF2, etc. I want it to pull the most recent file that it was updated. The table name is TEST_EEAF. Here is the code I have now:
Public Sub ImportEEAF()
Dim File1 As String
File1 = Dir("\\abc.com\dept\PAMO1\SPI\Projects\STT\Persona l\Mark Spuur\Test1\TEST_EEAF_CCP.txt")
Dir ("\\abc.com\dept\PAMO1\SPI\Projects\STT\Personal\M ark Spuur\Test1\TEST_EEAF_CCP.txt")
DoCmd.TransferText acImportDelim, "", "TEST_EEAF", ("\\abc.com\dept\PAMO1\SPI\Projects\STT\Personal\M ark Spuur\Test1" & File1)
End Sub