Error 2391 Field 'f1' Doesn't Exist In Destination Table, Access 2013 (1 Viewer)

abzalali

Registered User.
Local time
Today, 21:57
Joined
Dec 12, 2012
Messages
118
Dear Expert,
I'm getting error 2391 field 'f1' doesn't exist in destination table
Code:
Dim FileBrowse As Office.FileDialog
    Dim varFile As Variant
    Dim sFile As String
    Set FileBrowse = Application.FileDialog(msoFileDialogFilePicker)
    With FileBrowse
        .AllowMultiSelect = False ' <= Set to true if you need to select more than one text file
        .Title = "Please Select the File For Import"
        .Filters.Clear
        .Filters.Add "Text Files", "*.txt"
        .Filters.Add "All Files", "*.*"
        If .Show = True Then
            sFile = .SelectedItems(1)
            DoCmd.TransferText acImportDelim, , Me.cboTableList, sFile, False
            MsgBox "Transfer Complete!"
        Else
            MsgBox "Operation Cancelled"
        End If
    End With
Help me!!!!!!!!!!!!!!!!
 

abzalali

Registered User.
Local time
Today, 21:57
Joined
Dec 12, 2012
Messages
118
Here all text file to import with no header, tab delimited. If I import those file manually from EXTERNAL DATA Tab, then it goes normally,

If I use ImportSpec in docmd.TransferTex syntax then also ok. Error msg shows only with ImportSpec.
 

Users who are viewing this thread

Top Bottom