Hi all,

Using Access 2016.
Receiving a runtime error 3035 error in a DoComd.Transferspreadsheet snippet.

I searched a bit, seems many folks are stating their is a known bug in AceCore.dll
Anyone else seen this problem and know of a fix?


Sub TransferSpreadsheetUsingFunctions()
    'Purpose: Transfer Excel Worksheet to Access Table
    'Log    :
    'Date               Developer                   Action                      Comments
    'Declare variables
        Dim strFullFileName             As String
        Dim strPath                     As String
        Dim strFileNameSubstring        As String
        Dim sql                         As String
    'Declare constants
        Const strTableName As String = "tblMetrics"
        Const strTempTable As String = "tmpMetrics"
    'Initialize variables
        strFullFileName = GetFDObjectName()             'File for import
        sql = "INSERT INTO " & strTableName
        sql = sql & "SELECT * FROM " & strTableName & ";"
    'Initialize environment
        With DoCmd
            .SetWarnings False
            'Clear previous data
                DoCmd.OpenQuery ("qry_del_tblMetrics")

            'Transfer spreadsheet to temp table
                .TransferSpreadsheet _
                    TransferType:=acImport, _
                    TableName:=strTempTable, _
                    FileName:=strFullFileName, _
            'Append data from tmp table to final table
                .RunSQL sql

            'Tidy up
                'Drop tmp table
                    .DeleteObject acTable, "tmpMetrics"
                'Turn warnings on
                    .SetWarnings True
        End With
End Sub