-
Save RTF to Access Database
HI,
I was wondering if there a way to save a RTF to MS Access. What I am trying to do, is to allow the user to enter a text where he can have some words either: Bold, Underlined,ect... or also he can have some of the words in Red or other color. all the formatted text will be save into a database, then whenever he retrieves the text from the data, the text will be formatted the way he save it in the first place...
Thank you,
-
Yes you can. The TextRTF property of the RichTextBox Control contains all of the RTF needed. You can use a Memo Field to store the text. A regular text field only holds up to 255 characters, so including all of the rtf codes, it would not hold much.
-
thanks for the reply,
can you please post a sample on how to get it done, because I am not really familiar with RicthText control.
Thank you
-
I don't have any examples I can show you; But you can search in
FreeVBCode.com
See if there are any examples there.
Also check out the MSDN documentation on the control itself.
RichTextBox Control
The control also supports databinding just like a regular text box. Get your application working first. Make sure everything updates to the database correctly. Just use a RichTextBox on the field where you want the extra formatting. Then use the information you find above to code the formatting routines.
Once you get that far we can help you more.
Here are some examples of database apps in VB, One from freeVBCode.com, uses DAO, and One from The Planet Source Code, uses ADO. I have not looked at these projects so I don't know if they are any good; but It's a place to start.
Database Application Demo for Beginners
A Complete ADO Code Database Programming
Get as far as you can and then just create another post here if you get stuck. We will be gald to help.
-
Problem with RTF-to-Access
Hi,
I have a problem regarding this very issue. I have a RichTextBox that i store in a RTF-formatted memo field in MS Access; however, the the text that gets stored in the DB loses all its formatting.
Is there any way that I can store the RTF in MS Access without losing the formatting?
Any help would be greatly appreciated.
Thank You!
-
Sounds Like only the text is being saved in the memo field.
Try unbinding from the ritchtextbox control Then
Add an AfterUpdate Event Handler where you assign the memo Field directly with the value from the RitchTectBox Control's TextRTF Property.
Also add to the On Current Event Handler to set the TextRTF property to the value from the memo filed.
-
-
Adding the RTF to the MEMO field
Hi Ron,
Do you mean that i should add it to the DB using ADO.net?
-
ADO.NET? The code in the example link I posted is for Access VBA
-
.....OOPS! Sorry, i did not notice the link in your response...
-
...anyhow, my question was for vb.net, not VBA.
Thanx anyways.
Similar Threads
-
By jack in forum VB Classic
Replies: 1
Last Post: 09-17-2002, 10:57 PM
-
By marxbro in forum VB Classic
Replies: 6
Last Post: 08-21-2000, 07:14 PM
-
By Larry Rebich in forum VB Classic
Replies: 3
Last Post: 08-20-2000, 12:31 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|