I have an access table named SalesData with the following fields:
UID Autonumber
SaleDate
Test1
Test2
Test3
Test4
I want to import an excel sheet into the table but the table only has the Test1, Test2, Test3 and Test4 fields. The UID automatically generates upon import. The final field (SalesDate) I want to have is a date based on the name of the imported file. Ideally it would be the last 10 digits of the file name which would be a shortdate. Current code is:
Code:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "TestImport", "C:\Documents and Settings\tyork\Desktop\TestImport.xlsx", True
which successfully imports the excel file without the saledate field to the SalesData table also without the SalesDate field. Any help would be greatly appreciated.