Using Access 2007
I am trying to use a command button on a form to transfer data from a spreadsheet into an Access table.
The table has the following relevant fields:
The Excel 2007 sheet has the following fields:
Here is the code behind the command button:
When I try to execute the command button, I get error 3673 "This table contains cells that are outside the range contained in the spreadsheet."
Any tips on how to fix this?
Thanks.
Tom
I am trying to use a command button on a form to transfer data from a spreadsheet into an Access table.
The table has the following relevant fields:
Code:
RecordID (autoNumber), EnvNbr, Local, M and S, Building, Memorial, Other, Date Given, InMemoryOf, ToFund
The Excel 2007 sheet has the following fields:
Code:
RecordID (blank), EnvNbr, Local, M and S, Building, Memorial, Other, Date Given, InMemoryOf, ToFund, Total
Here is the code behind the command button:
Code:
DoCmd.TransferSpreadsheet acImport, 9, "tblNewGivings", "C:\Users\Tom Watson\Desktop\counter_sheet.xls", True, "A2:J2"
When I try to execute the command button, I get error 3673 "This table contains cells that are outside the range contained in the spreadsheet."
Any tips on how to fix this?
Thanks.
Tom