I am programmatically importing data from SQL Server into a local Access table. Several fields contain rich text in SQL, but when they are imported via append query into Memo fields set up with Rich Text in the Text Format property, the Rich Text encoding is not applied (they show up without line breaks).
As a workaround, I can change the Text Format property to Plain Text, then run the append query, then manually change the property to Rich Text in design view on the table. When I do that, a dialog will come up and say: 'The field will be converted to Rich Text, and all the data it contains will be HTML Encoded.' If I click OK, then Access will run through the column and apply the HTML encoding and all is well with the world.
Obviously, it isn't ideal to ask my users to manually change the design of several fields on the local table each time they want to refresh their data.
I've tried to change the Text Format property using VBA (CurrentDb.TableDefs("MyTable").Fields("MyField"). Properties("TextFormat").Value = acTextFormatHTMLRichText), but when I do that, the formatting is not applied. It changes the property, but in my forms the data still shows up without the line breaks.
The only way I have found to get Access to apply the HTML formatting is to manually change the design of the table. Does anyone know a better way to do this? Is there a way to force Access to apply the formatting during the import? I've tried changing the Text Format property in the append query, but that didn't have an impact.
Thanks for any advice!