CopyFromRecordset truncates text field at 1823 chars

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi:

I am using CopyFromRecordset to transfer data from Access to Excel.
It has been working fine. However, lately, we discovered that all text fields
get truncated at 1823 chars (including space).
Unfortunately, as we are dealing with legal stuff, a text with more than 2K
chars cannot be considered as an exception.
I look forward to any suggestions + helps.
Thanks
Vinh

Note: we are using MS Office 2000 on Windows 2000 Professional
 
Hi Vinh,

This seems to be an issue in Access 2000 and maybe other versions. Make
certain that you have the latest Office 2000 and Windows service packs,
in case it's been fixed in one of these.

Otherwise, you can work round the problem by replacing
CopyFromRecordset. Instead, write VBA code that iterates through the
recordset. For each record, iterate through the fields, placing the
field value in the appropriate Excel cell.

This should work until you hit the limit on characters in an Excel cell
(32,767?).
 
Hi John:

Thank you for the suggestions. I did actually what you recommended:
re-pasting cell by cell (memo fields only), row by row. It does take more
time. Especially, as you may have guessed, there are often more than 65,536
rows to retrieve so we are pushing the limits of Excel.

FYI, our release of Office 2000 is 9.0.6926 SP-3.

Thansk again
Vinh
 
Back
Top