Truncated memo field in query & mail merge output

G

Guest

Hi

I'm re-posting this as there were no responses last time.

I know this has been asked before but my experience doesn't match earlier
responses that I've read

I have a memo field "LetterText" in a SQL statement used to create a mail
merge letter from within Access. All works fine for short sections of text.
If the memo field is greater than 255 characters, a query based on the sql
statement truncates at 255 characters. Oddly the mail merge letter correctly
displays the first 500 characters then produces garbage.

For example, if the MessageText field was :
-----------------------------------------------------------
" I am writing to inform you that it is now officially summer! Your son /
daughter should now be wearing bermuda shorts and flip flops to school. Green
wellingtons are permitted as footwear on wet days. If it is very hot,
students should wear giant straw hats and sunscreen of at least SP Factor
365! School lunches will consist of rocket salad with spotted dick for
pudding.

I am great! Yes I am indeed! Oh yes !!!!!! Yes AGAIN

Please can I also remind parents that the end of term is coming up soon and
that after that it’s the holiday!
---------------------------------------------------------------
The query displays the following:

"I am writing to inform you that it is now officially summer! Your son /
daughter should now be wearing bermuda shorts and flip flops to school. Green
wellingtons are permitted as footwear on wet days. If it is very hot,
students should wear giant straw" (255 characters)

but the mail merge shows:
"I am writing to inform you that it is now officially summer! Your son /
daughter should now be wearing bermuda shorts and flip flops to school. Green
wellingtons are permitted as footwear on wet days. If it is very hot,
students should wear giant straw hats and sunscreen of at least SP Factor 365!

School lunches will consist of rocket salad with spotted dick for pudding.

I am great! Yes I am indeed! Oh yes !!!!!! Yes AGAIN

Please can I also remind parents that the end of term is coming up soon a
Âb`? ? ÿ?ÿ? O¨¦? ?? ??????( ?? "
------------------------------------------------------

A previous post shows a variety of causes for truncation:

1. Crosstab queries, Summary queries, Union queries, and Queries that use
Distinct or DistinctRow will all truncate a memo field to 255 characters so
Access can perform the required functionality of eliminating duplicates.

2 Also, if you have specified a format in the field's Format property, this
will often truncate the data as well.

3. If Unique Value Property is set to Yes, Access has to compare the values
and therefore Memo Field values are truncated.

None of these are true in my case.
The memo field is not formatted and the sql is:

SELECT PupilData.PupilID, PupilData.Surname, PupilData.Forename,
PupilData.Gender, PupilData.DateOfBirth, PupilData.YearGroup,
PupilData.TutorGroup, PupilData.Active, StudentAddresses.[Parental
Salutation], StudentAddresses.AddressBlock, StudentAddresses.LetterText,
Teachers.TeacherID, Teachers.Title & ' ' & Left(Teachers.Forename,1) & ' ' &
Teachers.Surname AS TeacherName
FROM Teachers INNER JOIN ((PupilData INNER JOIN StudentAddresses ON
PupilData.PupilID = StudentAddresses.PupilID) INNER JOIN ClassRecords ON
PupilData.PupilID = ClassRecords.PupilID) ON Teachers.TeacherID =
ClassRecords.TeacherID
WHERE (((PupilData.PupilID) In ('10720','9811','10812','10153')) AND
((PupilData.Active)=Yes) AND ((Teachers.TeacherID)=GetCurrentTeacher()))
ORDER BY PupilData.Surname, PupilData.Forename

Following another post, I have also tried grouping the sql but setting the
memo field to First rather than Group by ... the query then displays the same
as the merge letter text i.e. 500 characters followed by garbage

Any ideas on what I can try next?
 
R

ruralguy via AccessMonster.com

See if MVP Allen Browne can shed some light on the subject.
http://allenbrowne.com/ser-63.html
Hi

I'm re-posting this as there were no responses last time.

I know this has been asked before but my experience doesn't match earlier
responses that I've read

I have a memo field "LetterText" in a SQL statement used to create a mail
merge letter from within Access. All works fine for short sections of text.
If the memo field is greater than 255 characters, a query based on the sql
statement truncates at 255 characters. Oddly the mail merge letter correctly
displays the first 500 characters then produces garbage.

For example, if the MessageText field was :
-----------------------------------------------------------
" I am writing to inform you that it is now officially summer! Your son /
daughter should now be wearing bermuda shorts and flip flops to school. Green
wellingtons are permitted as footwear on wet days. If it is very hot,
students should wear giant straw hats and sunscreen of at least SP Factor
365! School lunches will consist of rocket salad with spotted dick for
pudding.

I am great! Yes I am indeed! Oh yes !!!!!! Yes AGAIN

Please can I also remind parents that the end of term is coming up soon and
that after that it’s the holiday!
---------------------------------------------------------------
The query displays the following:

"I am writing to inform you that it is now officially summer! Your son /
daughter should now be wearing bermuda shorts and flip flops to school. Green
wellingtons are permitted as footwear on wet days. If it is very hot,
students should wear giant straw" (255 characters)

but the mail merge shows:
"I am writing to inform you that it is now officially summer! Your son /
daughter should now be wearing bermuda shorts and flip flops to school. Green
wellingtons are permitted as footwear on wet days. If it is very hot,
students should wear giant straw hats and sunscreen of at least SP Factor 365!

School lunches will consist of rocket salad with spotted dick for pudding.

I am great! Yes I am indeed! Oh yes !!!!!! Yes AGAIN

Please can I also remind parents that the end of term is coming up soon a
Âb`? ? ÿ?ÿ? O¨¦? ?? ??????( ?? "
------------------------------------------------------

A previous post shows a variety of causes for truncation:

1. Crosstab queries, Summary queries, Union queries, and Queries that use
Distinct or DistinctRow will all truncate a memo field to 255 characters so
Access can perform the required functionality of eliminating duplicates.

2 Also, if you have specified a format in the field's Format property, this
will often truncate the data as well.

3. If Unique Value Property is set to Yes, Access has to compare the values
and therefore Memo Field values are truncated.

None of these are true in my case.
The memo field is not formatted and the sql is:

SELECT PupilData.PupilID, PupilData.Surname, PupilData.Forename,
PupilData.Gender, PupilData.DateOfBirth, PupilData.YearGroup,
PupilData.TutorGroup, PupilData.Active, StudentAddresses.[Parental
Salutation], StudentAddresses.AddressBlock, StudentAddresses.LetterText,
Teachers.TeacherID, Teachers.Title & ' ' & Left(Teachers.Forename,1) & ' ' &
Teachers.Surname AS TeacherName
FROM Teachers INNER JOIN ((PupilData INNER JOIN StudentAddresses ON
PupilData.PupilID = StudentAddresses.PupilID) INNER JOIN ClassRecords ON
PupilData.PupilID = ClassRecords.PupilID) ON Teachers.TeacherID =
ClassRecords.TeacherID
WHERE (((PupilData.PupilID) In ('10720','9811','10812','10153')) AND
((PupilData.Active)=Yes) AND ((Teachers.TeacherID)=GetCurrentTeacher()))
ORDER BY PupilData.Surname, PupilData.Forename

Following another post, I have also tried grouping the sql but setting the
memo field to First rather than Group by ... the query then displays the same
as the merge letter text i.e. 500 characters followed by garbage

Any ideas on what I can try next?
 

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