I have the following code which imports text into a new table in my database.
However, i am getting the error Runtime Error '3625'. The text file specification 'DataImport' does not exist.
I initially done a manual import and save the import steps thinking this would save as a specification?
I have looked in the MSysIMEXSpecs table MSysIMEXColumns tables and there are no records.
Any ideas why this isn't working. I am using Access 2010
Code:
Dim RecordCount As String
DoCmd.DeleteObject acTable, "tblImportedData"
DoCmd.TransferText acImportDelim, "DataImport", "tblImportedData", Me.txtFilename, True, ""
RecordCount = DCount("*", "tblImportedData")
CurrentDb.Execute "AppendNewLeads", dbFailOnError
Me.txtFilename = ""
MsgBox "You have successfully imported " & RecordCount & " records", vbInformation
End Sub
However, i am getting the error Runtime Error '3625'. The text file specification 'DataImport' does not exist.
I initially done a manual import and save the import steps thinking this would save as a specification?
I have looked in the MSysIMEXSpecs table MSysIMEXColumns tables and there are no records.
Any ideas why this isn't working. I am using Access 2010