I get the following error in both blocks of code: Field 'F1' does not exist in destination table <myTable>
For the life of me, I cannot solve this problem.
Code:
Private Sub ImportFile(strFullFile As String)
Application.SetOption "Confirm Action Queries", 0
Application.SetOption "Confirm Document Deletions", 0
Application.SetOption "Confirm Record Changes", 0
DoCmd.RunSQL "Delete * from do_not_call'"
DoCmd.TransferText acImportDelim, "", "Do_Not_Call", strFullFile, False
Code:
Sub ImportExcel(strFullFile)
Application.SetOption "Confirm Action Queries", 0
Application.SetOption "Confirm Document Deletions", 0
Application.SetOption "Confirm Record Changes", 0
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, "Valid_Numbers", strFullFile, False
End Sub