[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


Plain text, Rich text, extra characters in memo field

Posted on 2013-05-10
Medium Priority
Last Modified: 2013-05-18
I have a field [fldComments] with property:  
plain text

I have a form with this field
ON double click I open up a form in popup with this same field on it.  
It is similar the "zoombox" but I wanted to highlight certain words, which you cant do in zoombox.

The issue is that when I close the popup form there seems to be certain characters (ie <font or <div)  added to the  fldComments.  I am sure the characters correspond to the highlights, bolds that I made.

How can I avoid those characters but keep the plain text formatting?  I like the plain text formatting as it is easy to read but I would like to have another form that displays highlights, bolds etc etc.

thank you
Question by:pdvsa
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
LVL 58
ID: 39157060
You'd need to handle populating the text in a control with code, stripping out all the RTF formatting before placing the data in in.

LVL 58
ID: 39157073
Actually, I might be wrong on that.

 Put a RTF text bound on your form and leave bound.  Then try getting just the text with the .Text property of the control.


Author Comment

ID: 39157324
Jim... Thanks for the response.  
<Then try getting just the text with the .Text property of the control.
Could you explain a little more?  I am not sure what the .text property is.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 39158405
Do you think an update query could work?  I doubt it but thought would ask.  I think I would lose the RTF.  Thanks...I am sure you have more impt things to do...just when get a sec.  I am bored.
LVL 48

Expert Comment

by:Dale Fye
ID: 39159602
Those tags are the result of the rich text formatting.  If you display the textt in a text box formatted as plain text, you will see those tags unless you use a query as the source for the form, and use the PlainText() function to convert the value in the field to plain text.

Author Comment

ID: 39159692
Fyed... Thanks. Where is this plaintext function?
LVL 48

Accepted Solution

Dale Fye earned 2000 total points
ID: 39159766
It's one of the built-in VBA  functions.

Try this:

SELECT [fldComments], PlainText([fldComments] ) as Plain
FROM yourTable

You should see the two columns, the first will have the imbedded rich text tags, the 2nd should not.  

But I'm not sure why you would want to see Rich Text formatting in one form, and not the other, so you might just want to change the "Text Format" property of the textbox (Data tab of the Properties dialog) from "Plain Text" to "Rich Text"

Author Comment

ID: 39159825
<But I'm not sure why you would want to see Rich Text formatting in one form, and not the other
The reason is that I copy and paste text to the field and if I have it as RTF then the size and fonts are not consistent and it is not easy to read.  

let me test this...will come back soon.  thanks..
LVL 58
ID: 39162257
<<Jim... Thanks for the response.  
<Then try getting just the text with the .Text property of the control.
Could you explain a little more?  I am not sure what the .text property is.

 Sorry for taking so long to get back to this.  I did test this and it doesn't work.

 But as Fyed has pointed out, PlainText() is a VBA function that will return the plain text eith in a qeury or code. i.e.

Debug.? PlainText(forms![form1]![Text0].value)

 will yield plain text (didn't even know that was in there<g>).



Author Comment

ID: 39163536
Ok thank you ... I am just getting around to checking emAils.  I did not have free time today to test.  Hope to tomorrow... Thanks for checking in

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question