Hi,
My text file looks as below
A1010307300000038824 2024178000010000038800000380 O 0000038824-000001S513000000388 06055JFD6OM 000000000 * 85173 01965137 SB 030000000 533SEG5
I get an error message "There is no field name "A1010307300000038824" in tbltcc.
I have a single field, "message" in tbltcc to which I need to import the contents of the text file.
TIA
My text file looks as below
A1010307300000038824 2024178000010000038800000380 O 0000038824-000001S513000000388 06055JFD6OM 000000000 * 85173 01965137 SB 030000000 533SEG5
Code:
Private Sub Command0_Click()
Dim FSO As Object, objFolder As Object, objFile As Object
Set FSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = FSO.GetFolder("C:\Prasad\BC2\TC")
i = 1
For Each objFile In objFolder.Files
If Right(objFile.Name, 3) = "txt" Then
DoCmd.TransferText acImportDelim, , "tbltcc", objFolder & "\" & objFile.Name, True
End If
i = i + 1
Next objFile
Set objFile = Nothing
Set objFolder = Nothing
Set FSO = Nothing
End Sub
I get an error message "There is no field name "A1010307300000038824" in tbltcc.
I have a single field, "message" in tbltcc to which I need to import the contents of the text file.
TIA