joycesolomon
New Member
- Joined
- Aug 2, 2011
- Messages
- 48
Hi,
I have an excel book, that i want to import the data from sheet TASK, column A and D into a table in access....each time this data is generated the amount of records varies.... the data has first two rows with two types of heading too
I created the below code in Access VBA
DoCmd.TransferSpreadsheet transfertype:=acImport, SpreadsheetType:=5, _
tablename:="TASK2", FileName:="C:\Documents and Settings\Desktop\Test.xls", _
Hasfieldnames:=True, Range:="Task!"
But i keep getting error that the field F1 is not present in the access table, can someone please help.....
I have an excel book, that i want to import the data from sheet TASK, column A and D into a table in access....each time this data is generated the amount of records varies.... the data has first two rows with two types of heading too
I created the below code in Access VBA
DoCmd.TransferSpreadsheet transfertype:=acImport, SpreadsheetType:=5, _
tablename:="TASK2", FileName:="C:\Documents and Settings\Desktop\Test.xls", _
Hasfieldnames:=True, Range:="Task!"
But i keep getting error that the field F1 is not present in the access table, can someone please help.....