I have a datasheet style form with textbox (MyTextBox) that has the Text Format property set to "Rich Text". It is bound to a memo field in a table. How do I change the text or highlight color of certain text in the textbox such that the formating is saved in an underlying memo field?
My situation is a little different than other posts I read. Most posts show how to find and select certain text in a textbox, and then change the formating of the control (textbox). Since the form is a datasheet style form, changing the formating of the control will change the formating for that field in all records! I want to change the formating of the text IN the textbox so that the formating is captured in the memo field for an individual record. Make sense?
I've figured out how to find the records, fields, and text that I want to modify, but I'm missing the line of code that modifies text formating. Here's a sample of what I have:
What comes next? I've searched through all of the DoCmd.RunComman d's and I can't find one that changes the text color or highlight color.
Any help is greatly appreciated.
My situation is a little different than other posts I read. Most posts show how to find and select certain text in a textbox, and then change the formating of the control (textbox). Since the form is a datasheet style form, changing the formating of the control will change the formating for that field in all records! I want to change the formating of the text IN the textbox so that the formating is captured in the memo field for an individual record. Make sense?
I've figured out how to find the records, fields, and text that I want to modify, but I'm missing the line of code that modifies text formating. Here's a sample of what I have:
Code:
Me.MyTextBox.SetFocus Me.MyTextBox.SetFocus.SelStart = 0 Me.MyTextBox.SetFocus.SelLength = Len(MyRichTextBox.Value)
Any help is greatly appreciated.
Comment