Unanswered: Trouble converting/keeping field in Rich Text Format
Using MS Access 2010
I am having a challenge getting memo field to display as rich text format.
Main desire is to keep paragraphs separate like it was entered into our system.(rich text
format) Oddly, main live warehouse table has field in plain text format but
the field appears to have the rich text formatting code/features imbedded.
If i take field and paste into excel with paste special and paste as text
the formating works out excactly as desired - spacing and paragraph indendation.
I can go into design view of the shell reporting table that is being updated
(ie. code is ran at push of button that deletes current records and inserts
new data for reporting) and change the field from plain text to rich text
and it feeds report in rich text format with the desired formatting.
(On the report I have the field set-up in properties as rich text format.)
It only seems to work if I let the main table feed it's plain text field
into shell table as plain text first and then manually change that field format
from plain text to rich text on the reporting shell table . I cannot change
the field in the shell reporting table from plain text to rich text ahead of time.
(ie. before reporting shell table is cleared out and updated with new records.)
Also, below is some code that i have set-up running that changes field
format from plain text to rich text format but doesn't seem to work as I desire on report.
Also, I have some other code that I found out on internet that seems to cut off
the memo field but individual who posted says it works for him but it doesn't appear
that he is using on memo field.
Any help is appreciated. I'm finding this really frustrating.
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim fld As DAO.Field
Set db = CurrentDb
Set tdf = db.TableDefs("Table1")
Set fld = tdf.Fields("memo_fld")
Debug.Print "acTextFormatPlain: " & acTextFormatPlain & _
"; acTextFormatHTMLRichText: " & acTextFormatHTMLRichText
Debug.Print "TextFormat: " & .Value
If .Value = acTextFormatPlain Then
.Value = acTextFormatHTMLRichText
Debug.Print "TextFormat changed to: " & .Value