AccessHelp123
Programmer
Hi,
I am trying to import several sheets from an excel file into an access table using the VBA code below in MS Access.
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "tbl_Sheet1", strFile, True, "Sheet1!"
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "tbl_Sheet1", strFile, True, "Sheet2!"
.. and so on....
This command works on my laptop but when one of the users tries to run the code they get an error saying
Field 'Technology' doesn't exist in the destination table 'tbl_Sheet1.'
"Technology" is a constant value in the first column named "Group" in the excel sheet "Sheet1". The Access table tbl_Sheet1 has the first column name as "Group".
The excel file has a few empty rows in Sheet1. Does Access consider this to be the end of the file and consider the next row with data to be the header or something? ... I cant think of a reason why this would work on my computer and not someone else's.
Any help regadring this would be great. Thanks.
I am trying to import several sheets from an excel file into an access table using the VBA code below in MS Access.
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "tbl_Sheet1", strFile, True, "Sheet1!"
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "tbl_Sheet1", strFile, True, "Sheet2!"
.. and so on....
This command works on my laptop but when one of the users tries to run the code they get an error saying
Field 'Technology' doesn't exist in the destination table 'tbl_Sheet1.'
"Technology" is a constant value in the first column named "Group" in the excel sheet "Sheet1". The Access table tbl_Sheet1 has the first column name as "Group".
The excel file has a few empty rows in Sheet1. Does Access consider this to be the end of the file and consider the next row with data to be the header or something? ... I cant think of a reason why this would work on my computer and not someone else's.
Any help regadring this would be great. Thanks.