I am using Access 2003. I've been importing Excel 2003 spreadsheets using the wizard in Access for some time now. The spreadsheet does NOT have the column names in the 1st row, so the wizard names them "Field1", "Field2", etc., by default. I decided to automate the process and I am using the following line of code:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, strFileName, FileSpec, FieldNamesInRowOne
The argument for FieldNamesInRowOne is passed either true or false, depending on my needs
When I pass it false, it works fine, but it names the fields "F1", "F2", etc.
I'm looking for an answer as to why the default field names are different. And is there a setting somewhere for the import wizard's default field name assignments?
I won't complicate it too much by adding more, but I will just say I have all of the imported files archived. It would be very useful if they all had the same field names, regardless of how they were imported.