Can someone tell my why this is not seeing my file in its location because it is there. Iam trying to import all .txt files in one folder and then archive in a seperate folder. I am not an expert by any means.. know enough to be dangerous..
Code:
Private Sub ImportFiles_Click()
Dim RSO As Object
Dim strFolderPath As String
Dim strFile As String
Set RSO = CreateObject("Scripting.FileSystemObject")
strFolderPath = "C:\SFOEDL\TL"
strFile = Dir(strFolderPath & "\*.txt", vbNormal)
Do While strFile <> ""
If strFile > " " Then
DoCmd.TransferText acImportFixed, "TLimport", "TblTL", strFile, False
Name strFolderPath & strFile As "C:\SFOEDL\TL\Archive"
End If
strFile = Dir()
Loop
End Sub
Comment