I am trying to import a spreadsheet to a table.
On my computer, it works fine.
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Data", myFileName, True
True being the "HasFieldNames" parameter
I copy this file onto another machine and it no longer assigns field names. It imports the field names as data and calls the fields F1, F2, etc. with an empty record as the first record.
What is going on? Am I doing something wrong? Is there a work around? I need column headers because I use the field name in a query a couple of lines down in the code. Any suggestions?
My Versions
Microsoft Access 2000 (9.0.6926 SP-3)
Microsoft Excel 2000 (9.0.6926 SP-3)
Other PC versions
Microsoft Access 2000 (9.0.3821 SR-1)
Microsoft Excel 2000 (9.0.3821 SR-1)
PB
On my computer, it works fine.
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Data", myFileName, True
True being the "HasFieldNames" parameter
I copy this file onto another machine and it no longer assigns field names. It imports the field names as data and calls the fields F1, F2, etc. with an empty record as the first record.
What is going on? Am I doing something wrong? Is there a work around? I need column headers because I use the field name in a query a couple of lines down in the code. Any suggestions?
My Versions
Microsoft Access 2000 (9.0.6926 SP-3)
Microsoft Excel 2000 (9.0.6926 SP-3)
Other PC versions
Microsoft Access 2000 (9.0.3821 SR-1)
Microsoft Excel 2000 (9.0.3821 SR-1)
PB