Hi mshmyob,
Thanks for replying to my post. My form
is a subform with the Default View property set to "Datasheet" (no other views are allowed). The form only contains a few textboxes that are bound to memo fields in "MyTable". The textboxes have the Text Format property set to "Rich Text". This is an Access 2007 database (i.e. *.accdb).
I did not include information about criteria in my original post because I thought it was extemporaneous to my primary question and I didn't want to burden folks with unnecessary details. But in answer to your question (at least partly) my application reads text out of a Microsoft Word 2007 file. It then looks for matching text in the memo fields in MyTable.
If matching text is found in MyTable, I want to permanently change the text and background color in the memo field (and not just temporarily display it). I couldn't figure out how to modify the formating of the text by accessing the memo fields in MyTable directly via a DAO recordset. So, instead, I bound the memo fields to textboxes on a form and am trying to modifiy the text and background color in the textboxes, then update MyTable.
It seems like it should be so easy.
1. Set focus to a particular textbox
2. Set the selection start position (based on the text I'm looking for)
3. Set the selection length (based on the text I'm looking for)
4. Change the text/background color
5. Update the data back to MyTable
I just can't figure out the VB code for item 4.
Thanks for your help!
Quote:
Originally Posted by mshmyob
Hello Sphinney,
When you say a datasheet view are you talking about a subform?
What is your criteria to determine the change in colour of the memo field?
Do you actually want the Memo field to save the colour codes permanently or just appear to change colours on the form? (I could do either for you)
Is this Access 2007?
cheers,