mkaufmann
asked on
RTF and msaccess
I want to load an rtf file in a RichTextBox Control. The file should be stored in a msaccess database.
I made a table in an access database with one field, that is an OLE-field. Then I put in a rtf-file in this table. When I doubleclick this field in the database then MS-Word will be started. Now I've tried to load the rtf file from the database with Visual Basic in the Rich Text Box Control. I put an ADO-Control on a form, set the connection string and the Record Source. Then I set the DataSource of the RichTextBox Control to this ADO Control and I set the DataField property of the RichTextBox Control to the field in the database. When I start now the application, then something is loaded from the database, but I can't read it.
The text looks like this:
??????
What Is my mistake? Is it possible to store a rtf file in a msaccess db an to load it in a RichTextBox Control?
Sorry for my english...!
Thank you very much!!!
I made a table in an access database with one field, that is an OLE-field. Then I put in a rtf-file in this table. When I doubleclick this field in the database then MS-Word will be started. Now I've tried to load the rtf file from the database with Visual Basic in the Rich Text Box Control. I put an ADO-Control on a form, set the connection string and the Record Source. Then I set the DataSource of the RichTextBox Control to this ADO Control and I set the DataField property of the RichTextBox Control to the field in the database. When I start now the application, then something is loaded from the database, but I can't read it.
The text looks like this:
??????
What Is my mistake? Is it possible to store a rtf file in a msaccess db an to load it in a RichTextBox Control?
Sorry for my english...!
Thank you very much!!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think you need to store the rtf in a memo type field rather than the OLE. Change the Access Db field to memo and see what happens.
Use a memo field
Rtb1.TextRtf = "" & rs!memo
M
Rtb1.TextRtf = "" & rs!memo
M
Also, the RTB control is not a fully functional RTF environment, tables and lines, for instance, are not supported. You can do basic editing and such, but that's about it.
M
M