943,662 Members | Top Members by Rank

Ad:
Mar 9th, 2009
0

Insert newline character in to Access databse

Expand Post »
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tulsi_apr03 is offline Offline
13 posts
since Jan 2009
Mar 24th, 2009
0

Re: Insert newline character in to Access databse

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.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
EraserveAP is offline Offline
2 posts
since Feb 2009
Mar 24th, 2009
0

Re: Insert newline character in to Access databse

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tulsi_apr03 is offline Offline
13 posts
since Jan 2009
Jun 11th, 2009
0

Re: Insert newline character in to Access databse

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.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
wjjkobrien is offline Offline
1 posts
since Jun 2009
Jun 17th, 2009
0

Re: Insert newline character in to Access databse

it is working fine. Inserted text was not grater than 255 chars. I took memo instead of text. k thank u
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tulsi_apr03 is offline Offline
13 posts
since Jan 2009
Mar 20th, 2010
0

VbCrlf and VBNewLine - Wont work in RTF ??

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??
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Access07-Jon is offline Offline
19 posts
since Mar 2010
Mar 20th, 2010
0
Re: Insert newline character in to Access databse
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.
Last edited by Dan08; Mar 20th, 2010 at 8:35 am.
Reputation Points: 18
Solved Threads: 9
Junior Poster
Dan08 is offline Offline
133 posts
since Jul 2009
Mar 20th, 2010
0
Re: Insert newline character in to Access databse
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Access07-Jon is offline Offline
19 posts
since Mar 2010
Mar 20th, 2010
0
Re: Insert newline character in to Access databse
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.
Reputation Points: 18
Solved Threads: 9
Junior Poster
Dan08 is offline Offline
133 posts
since Jul 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MS Access and FileMaker Pro Forum Timeline: 2 Tables/Queries in 1 Form
Next Thread in MS Access and FileMaker Pro Forum Timeline: MS access database





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC