I have the following line in vba in access 2007:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Floor_Execution_Import", str, True, "B4:H30"
The format of the data in the .xslx is as follows:
ELECTRONIC
Date ELECTRONIC Ticket # Account # B/S Quantity Month Product
Tuesday, July 10,2012
electronic 245 48795849 b 1 q lh
electronic 621 25212375 s 1 z yc
electronic 2 61533013 b 1 q s
electronic 246 25212375 b 1 z yc
The range includes only the data starting at electronic and ending at yc (obviously including a few extra rows in case the user has more information). Unfortunately, when I try to import it into the SQL Server 2008 R2 table I get the following error:
Run-time error '2391':
Field'245' doesn't exist in destination table 'Floor_Execution_Import'.
The table Floor_Execution_Import has the following fields:
Electronic varchar(50)
Ticket varchar(50)
Account varchar(50)
BS varchar(50)
Quantity varchar(50)
Month varchar(50)
Product varchar(50)
I really cannot see why this error message is being produced. Can anyone help me on this one? Any help is appreciated. Thanks.
Dave
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Floor_Execution_Import", str, True, "B4:H30"
The format of the data in the .xslx is as follows:
ELECTRONIC
Date ELECTRONIC Ticket # Account # B/S Quantity Month Product
Tuesday, July 10,2012
electronic 245 48795849 b 1 q lh
electronic 621 25212375 s 1 z yc
electronic 2 61533013 b 1 q s
electronic 246 25212375 b 1 z yc
The range includes only the data starting at electronic and ending at yc (obviously including a few extra rows in case the user has more information). Unfortunately, when I try to import it into the SQL Server 2008 R2 table I get the following error:
Run-time error '2391':
Field'245' doesn't exist in destination table 'Floor_Execution_Import'.
The table Floor_Execution_Import has the following fields:
Electronic varchar(50)
Ticket varchar(50)
Account varchar(50)
BS varchar(50)
Quantity varchar(50)
Month varchar(50)
Product varchar(50)
I really cannot see why this error message is being produced. Can anyone help me on this one? Any help is appreciated. Thanks.
Dave