Hi all.
I have some code for a import of an Excel file. The code uses variables for the strings for table name, file path, and range. (code below).
This code works for all of our clients except one AND for that one it works for the first 6 monthly reports. None of the last 6 monthly reports will import without throwing the Runtime error 3709 'The Search Key was not found in any Record'.
I check the field headers and there are no special characters used in the headers except the underscore (_) and the single quote ('). These are both found in the first 6 monthly reports for this client.
I also checked and there are no leading or trailing spaces in the field headers.
I am about at my wits end over this.
This is the code without the variables - still throws error
Any ideas?
I have some code for a import of an Excel file. The code uses variables for the strings for table name, file path, and range. (code below).
This code works for all of our clients except one AND for that one it works for the first 6 monthly reports. None of the last 6 monthly reports will import without throwing the Runtime error 3709 'The Search Key was not found in any Record'.
I check the field headers and there are no special characters used in the headers except the underscore (_) and the single quote ('). These are both found in the first 6 monthly reports for this client.
I also checked and there are no leading or trailing spaces in the field headers.
I am about at my wits end over this.
Code:
Set ws = ActiveSheet
Set db = CurrentDb
strRNG = strSNAME & strRNG
DoCmd.TransferSpreadsheet _
acImport, _
acSpreadsheetTypeExcel12, _
strTBLNAME, _
strFILENAME, _
True, _
strRNG
This is the code without the variables - still throws error
Code:
DoCmd.TransferSpreadsheet _
acImport, _
acSpreadsheetTypeExcel12, _
"TEMP_TBL_GFEBS_JUN_2015", _
"G:\Financial Reconciliations\Data Files\ERP ARMY_GFEBS\4.1 CBDP " _
& "- GFEBS GL Data\GFEBS_FY15_09_097_CBDP_P.xlsx", _
False, _
"GFEBS_FY15_JUN_097_CBDP!A1:FN37085"
Last edited: