D
Del
I am using TransferSpreadsheet method to import Excel files into Access 2000.
I want to use the data in the first record as the field names but one of the
fields has a dash in it. When I set hasfieldnames = true all it does is
delete the first record and the field names remain F1, F2, etc. How can I
get around this? I have no control over the names assigned in the
spreadsheet columns and I don't want my users to have to open the spreadsheet
and make changes before they import it.
The code I'm using is:
DoCmd.TransferSpreadsheet , , Me.txtExcelTableName, Me.txtImportPath,
intFieldName
I want to use the data in the first record as the field names but one of the
fields has a dash in it. When I set hasfieldnames = true all it does is
delete the first record and the field names remain F1, F2, etc. How can I
get around this? I have no control over the names assigned in the
spreadsheet columns and I don't want my users to have to open the spreadsheet
and make changes before they import it.
The code I'm using is:
DoCmd.TransferSpreadsheet , , Me.txtExcelTableName, Me.txtImportPath,
intFieldName