DoCmd.TransferSpreadsheet acImport and Excel field size >255
Posted on 2006-05-16
I've got an ACCESS (Xp) module that imports data from Excel spreadsheets using the following commmand line:
DoCmd.TransferSpreadsheet acImport, , "tmpTNZI", _
where 'tmpTNZI' is the table name that the data from the Excel spreadsheet is written to and 'TheFile' is a string varaiable containing the path and file name of the source Excel spreadsheet.
The routine works fine, however one of the fields in the Excel spreadsheet sometimes has contents that are longer than 255 characters. I thought that setting the target field in table 'tmpTNZI' to type 'memo' would solve the problem but it hasn't. The contents of the EXcel cell get truncated at 255 characters when written to the ACCESS table. Any ideas on how to get round this one?