Looking to conditionally format specific text within a memo field in a report

RCCOLA

New member
Local time
Today, 11:38
Joined
Jan 15, 2013
Messages
8
Hello, I am attempting to condiotionally format certain text (not the entire field) within a memo field in a report. I have several values and each of the values need to be formatted either red, blue, or green. So For example I would like access 2007 to look for the following string of characters and conditionally format them red. Look at a different set of characters and conditionally format them blue, and green respectively. I do not what to considitionally format the entire field and there are about 22 different conditions I am trying to statisfy? Is there a VBA code or something I can use to make this happen? Thanks.
 
Welcome aboard:)
First of all, you need to be working with A2007 or A2010. If not, you will need to purchase a rich text control from a company such as www.FMSINC.com.
Secondly, depending on whether you use the internal Access rich text control or a third party control, you need to determine whether the data is stored in word's RTF format or in HTML. Then you need to figure out what the correct tags are and finally, you need to apply them. On top of that, you need to NOT apply them if you have already done the update or you'll end up duplicating the tags.

I would figure out what tags I need by example. Use the form controls to format the text strings on the form. Then go into the table and view the tags that were inserted into the text.
 
Thanks Pat, I will start doing some research on tags. I'm working with A2007 but for some weird reason I can not search for certain records when the boxes are in memo format and I need them to be in memo format for a search for I set up. I have to keep them in plain text. The way I have it setup now is you input data into a form. Button opens query for a single record which then opens a report pre-formatted a certain way. The report can then be exported to word in RTF format but I need certain text within the field (which is memo not a text box) it exports (via report, query form) to search and if it finds a certain word like "archive", I need that word only to be highlighted in say green. I will take a look at the tags. Thanks for the guidance. I need to learn SQL and VBA!!
 
If you have to keep the memo as plain text, you will not be able to format individual words.
 
Now, I don't want it to format in the actual memo field in the form. I would like to have it format it when I open the report for the selected record from the form. I have conditionally format the entire field if it recognizes the criteria I set but I can't conditionally format just part of that field based on the criteria I set. :banghead: Fail!
 
You could probably do this by creating an unbound control to show the formatted data. You would have to add the formatting tags in the on format event.
 
Thanks I'll give it a shot. I'm not Looking to format the entire field, just every time a specific set of words appear on the report. Thanks again.
 
I'm not Looking to format the entire field, just every time a specific set of words appear on the report
I know that. Formatting the entire control is trivial and only requires a property setting. To format individual substrings, you need to search the whole string and surround the sought substring with the correct formatting tags for the visual effect you want.
 
Thank you. For now I just switched it to memo type. Now I know what to do though.
 
plse could Pat Hartman or similar guru have a look at my recent post (July 9th, 2013 South Australian time) which is on a similar sort of problem/task

EdK
 

Users who are viewing this thread

Back
Top Bottom