Avatar of gdunn59
 asked on

Access query Exports to Excel and Memo Field has HTML Codes - Why?

I have attached my code for review.

The problem I am experiencing is when the query is exported to an Excel Spreadsheet, the Memo field in the query contains weird characters mixed in the text, i.e.:

  <div><font face=Arial size=2>E&amp;C received a question from HR about

What is causing this, and how can it be avoided?

I am using MS Access and Excel 2007.

Microsoft DevelopmentMicrosoft Access

Avatar of undefined
Last Comment

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Jeffrey Coachman

<No Points wanted, as it seems that trbaze has answered your direct question here>

In Office 2007 and newer, you can format the data stored in the tables.
This formatting is called "Rich Text".
However, "Rich Text" in Office 2007 and newer is really HTML.

What you are getting looks like the HTML Tags:
<b> BoldText</b>
...will Produce:

FWIW, this is another reason why I am not a huge fan of storing "Formatted" data...
I only format in the final output.

Jeffrey Coachman


You seem to be doing quite well as an Expert lately...

I see that you have been a member since 2007.
Why did you wait so long to started participating regularly as an expert?

In any event, welcome aboard!


Mainly because I was a novice at access in 2007 and have greatly increased my skill since then.  Experts exchange has been such a great help to me and I felt it was time to give back and help where I can.  Unfortunaltley because of our harvest season, half of the year I have no time to monitor EE.
Your help has saved me hundreds of hours of internet surfing.
Jeffrey Coachman


Sorry, I did not read your question correctly...

As for the "Why", it is because this formatting is "stored with" the data.

Again, this is why I don't use this feature often, I only format in the final output.

Again, trbase has posted a great looking solution, so I don't want any points for my "informational posts"