If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Create a recodset selecting values directly from a table and appending values to the end of some fields - data is truncated e.g. SELECT CCCODE.[Code Type], CCCODE.[Code Value], CCCODE.[Manager ID] & ""OS100000"" AS [Manager ID] FROM CCCODE

When either using a query or selecting values directly from a table, all the data is selected, it's when the data is written to the excel file that it's truncated.

I was originally using '.CopyFromRecordset rs' to write the data to the excel file but thought this may be the problem. So I changed to looping through each record, but still doesn't work.

Is there a field length limitation, or am I not doing this correctly?

Below is the core part of the code used in the function to create the excel file.