In my VB6 project i have a text area field, iwant to insert data which i give in that text area wants to insert into Access database. For that which data type i need to take for that column.

1) If i take Memo or text as datatype: only singleline will be inserted .not all the lines.

How am i insert entire document in the database through VB6 form that contains textarea

Recommended Answers

All 8 Replies

In my VB6 project i have a text area field, iwant to insert data which i give in that text area wants to insert into Access database. For that which data type i need to take for that column.

1) If i take Memo or text as datatype: only singleline will be inserted .not all the lines.

How am i insert entire document in the database through VB6 form that contains textarea

You can use "Some text" & vbCrLf & "Some more text". This will cause "Some more text" to appear in a new line. This should work for both Memo and Text data types.

sorry for my question,
im inserting large data into MS Access database from vb text area, so if i opened database im able to see only single line thats it , so i thought next line was not inserted into database.

again im retrieving tha same data then the entire data was displayed line by line .
thank u for your reply

you can not concatinate text into a memo field, after 255 characters it will accept no more input, this is an access deficiency.
dimension BUCKET as a string, as you go thru your code you can put all of the text strings in as needed. at the end of your code dump BUCKET into the memo field.

it is working fine. Inserted text was not grater than 255 chars. I took memo instead of text. k thank u

Does anyone know if VbCrlf will work to make a new line in a memo field that is set as RichText ? I have a richText memo field and have been attempting to do the following:

Me.MemoFieldRichText.value = vbCrLf & "This is a new entered into this memo field from a cmd" & vbNewLine & "This is the second line:" & vbCrLf & "And this is the third line"

This just outputs into memo field as one continious line. I have also tried VbNewLine. yet exact same result. Memo needs to be RTF as I want users to be able to format with bullet points.

any ideas??

Does anyone know if VbCrlf will work to make a new line in a memo field that is set as RichText ? I have a richText memo field and have been attempting to do the following:

Me.MemoFieldRichText.value = vbCrLf & "This is a new entered into this memo field from a cmd" & vbNewLine & "This is the second line:" & vbCrLf & "And this is the third line"

This just outputs into memo field as one continious line. I have also tried VbNewLine. yet exact same result. Memo needs to be RTF as I want users to be able to format with bullet points.

any ideas??

This is how it should be:

me.Caption = "First line" & vbNewLine & "Second Line"

Hope it helps, and next time create a new thread.

Hi thanks for reply, I just tried that and it does the same - both phrases on the same line in the RTF memo field

Private Sub cmdNewlines_Click()
Me.DocsNeededToProceed = "First line" & vbNewLine & "Second Line"

End Sub

Hi thanks for reply, I just tried that and it does the same - both phrases on the same line in the RTF memo field

Private Sub cmdNewlines_Click()
Me.DocsNeededToProceed = "First line" & vbNewLine & "Second Line"

End Sub

Create a new thread and ill try to help. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.