Reputation: 11
I have a Microsoft access 2010 database where I place data in using a richtextbox after one line with 4 words of text that has been formatted I get an error saying "the field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data" I did set the table rows to 255 characters and I'm only inserting 4 words
Upvotes: 0
Views: 143
Reputation: 703
Well, a richtextbox contains formatting information, so it will return a much longer text than what you see in the control.
See this code for example:
Option Compare Database
Option Explicit
Private Sub Detail_Click()
MsgBox Me.RichTextBox0.Value
End Sub
Private Sub Form_Load()
Me.RichTextBox0.Value = "Only four words really!"
End Sub
This will return:
{\rtf1\ansi\deff0\nouicompat{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}}
{\*\generator Riched20 15.0.4481}{\*\mmathPr\mwrapIndent1440 }\viewkind4\uc1
\pard\f0\fs17\lang1033 Only four words really!
\par
\par }
Upvotes: 2