HTML strings are getting corrupted at the ends.

Mark LaGrange
Mark LaGrange used Ask the Experts™
VBA routine, that formats a string of HTML, that has been working for years, suddenly started throwing strange ASCII codes at the end of strings in apparently random records.

The 1st attached pic is a screen shot of the output, all ok until the last row.
The 2nd attached pic is a screen shot of the output, just the errors in the first 120 of 211 records.

Doesn't seem to relate to the length of the string it's stringing together ("EntityNamesDisp"), but it does seem to happen at the ends of the strings.

Sorry to post such a vague, bizarre question, but it's a vague, bizarre problem. I'm just hoping this just jumps out at somebody that has seen this before.

(This is Access 2003. )
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I have seen similar output when sending long strings as parameter from Access to SQL Server.
My only solution was to save that string to a table and have my stored proc take it from there..
MIS Liason
Most Valuable Expert 2012
Also make *sure* that your string does not have any "non-printable characters".

Also try formatting the string in "sections" then verify each section, ...then concatenate them together.
For example, ...format a string with all the text up to the email, and see if it displays OK.
Then in another string, ...format just the email, ...and see if that displays OK.
If the both display properly, ...then concatenate them together and see how that looks...

You also did not post the code you are using to create these strings, we can investigate...


I tried several things to figure out what was causing this; always the same element on the same records (the plan consultant e-mail address), but that same element concatenated fine on other records. I'll return to this later, maybe; too much end-of-year production work going on right now.

Thanks for your responses. Sorry it took so long to close the question.
Jeffrey CoachmanMIS Liason
Most Valuable Expert 2012

OK, great

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial