Solved

Plain text, Rich text, extra characters in memo field

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

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
0
Comment
Question by:pdvsa
  • 5
  • 3
  • 2
10 Comments
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
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.

Jim.
0
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
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.

Jim.
0
 

Author Comment

by:pdvsa
Comment Utility
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.
0
 

Author Comment

by:pdvsa
Comment Utility
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.
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
Comment Utility
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.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:pdvsa
Comment Utility
Fyed... Thanks. Where is this plaintext function?
0
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
Comment Utility
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"
0
 

Author Comment

by:pdvsa
Comment Utility
fyed:  
<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..
0
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
<<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>).

 NO POINTS HERE PLEASE.

Jim.
0
 

Author Comment

by:pdvsa
Comment Utility
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
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

728 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now