Problem with TransferSpreadsheet - memo fiedl gets truncated

B

Bodo

Access: 2002, SP3 (10.6501...)
Excel: 2002, SP3 (10.6841..)

Hi,

when I run the following code from my Access database the values from
memo field values are getting truncated when transfered to an excel sheet
using TransferSpreadsheet:

Set qdf = CurrentDb.CreateQueryDef(Queryname)
With qdf
.SQL = "Select * INTO " & TargetTable & " from myQuery " & WhereClause
.Execute dbFailOnError
.Close
End With
Set qdf = Nothing
CurrentDb.TableDefs.Refresh

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, TargetTable,
Me!ExportPfaddatei, True

I noticed that access creates a TargetTable_Exporterror table with a record
indicating a truncate error with the memo field.


Appreciate any thoughts on how to troubleshoot.
 
B

Bodo

The query "myQuery" that I use in the code sample is an access query that is
based on a ODBC linked SQL Server 2005 view.
However when I run the query "myQuery" in Access manually and click the
File... Export menu and export to Microsoft Excel 97-2002 the content of the
memo field is completely export to the excel file.

Appreciate any help
Thanks
Bodo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top