hi i wrote following sub to import a number of textfiles into a table:
Sub import()
Dim i As String
i = 0
Dim filename As String
While i < 158
filename = "C:\" + i + ".txt"
DoCmd.TransferText acImportDelim, , "tbl_import", filename, 1
i = i + 1
Wend
End Sub
the first line of the file contains the fieldnames, divided by tabs and spaces. they are equal to the tables fieldnames.
if i process the sub, i get following error-msg: "Field:"Myfiel1_myfield2_myfield3" does not exist.
why does access not recognize the fieldnames?
thanx for your help
Sub import()
Dim i As String
i = 0
Dim filename As String
While i < 158
filename = "C:\" + i + ".txt"
DoCmd.TransferText acImportDelim, , "tbl_import", filename, 1
i = i + 1
Wend
End Sub
the first line of the file contains the fieldnames, divided by tabs and spaces. they are equal to the tables fieldnames.
if i process the sub, i get following error-msg: "Field:"Myfiel1_myfield2_myfield3" does not exist.
why does access not recognize the fieldnames?
thanx for your help