Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




How Do I Save Multiline Textbox Text


am Using SQL for saving into MSAccess database
but its not Saving Multiline Text Box

VB Code:
SQL = " insert into Inward_local (Receipt_no,Receipt_date, Po_no,Dc_no,Dc_date,Invoice_no,User_dept," SQL = SQL & " Vendor_name,Vendor_add,Ship_date,Ship_time,Ship_day," SQL = SQL & " Carrier_name,LR_no,Vehicle_no,Tot_lbrs_chk,Tot_lbrs," SQL = SQL & " Cmn_lbrs_chk,Cmn_lbrs,MRN_no,Tot_pkgs,Qty_asper_challan,Acc_qty," SQL = SQL & " Wt_material,Tot_amount,Qty_damage_chk,Qty_damage,Qty_excess_chk,Qty_excess," SQL = SQL & " Qty_shortage_chk,Qty_shortage,Qty_wet_chk,Qty_wet,Remark,LF_no,Attain_by,Verify_by," SQL = SQL & " Certify_by,Security_by )" & " values (" & MDIchild3.txtreceiptno & ",'" & CDate(MDIchild3.txtreceiptdate) & "'," & MDIchild3.txtpono & "," SQL = SQL & MDIchild3.txtdcno & ",'" & CDate(MDIchild3.txtdcdate) & "'," & MDIchild3.txtinvoiceno & ", " SQL = SQL & "'" & MDIchild3.cbouserdept.Text & "','" & MDIchild3.cbovendorname.Text & "','" & [b]MDIchild3.txtvendoradd.Text [/b] & "', " SQL = SQL & "'" & CDate(MDIchild3.txtshipdate) & "','" & CDate(MDIchild3.txtshiptime) & "','" & MDIchild3.cboshipday.Text & "'," SQL = SQL & "'" & MDIchild3.cbocarrname.Text & "'," & MDIchild3.txtlrno & ",'" & MDIchild3.txtvehicleno.Text & "'," SQL = SQL & MDIchild3.chklbr.Value & "," & MDIchild3.txtnolbr & "," & MDIchild3.chkclbr.Value & "," & MDIchild3.txtcomlbr & "," SQL = SQL & MDIchild3.txtmrnl & "," & MDIchild3.txtnopkgs & "," & MDIchild3.txtqtychallan & "," & MDIchild3.txtaccqty & "," & MDIchild3.txtwtmaterial & "," SQL = SQL & MDIchild3.txttotamnt & "," & MDIchild3.chkdamage.Value & "," & MDIchild3.txtdamage & "," SQL = SQL & MDIchild3.chkexcess.Value & "," & MDIchild3.txtexcess & "," & MDIchild3.chkshortage.Value & "," SQL = SQL & MDIchild3.txtshortage & "," & MDIchild3.chkwet.Value & "," & MDIchild3.txtwet & "," SQL = SQL & "'" & MDIchild3.txtremark.Text & "','" & MDIchild3.txtlfno & "','" & MDIchild3.cboattainby.Text & "','" & MDIchild3.cboverifyby.Text & "'," SQL = SQL & "'" & MDIchild3.cbocertifyby.Text & "','" & MDIchild3.cbosecurityby.Text & "')"


i bolded out the Textbox
in that i have typed address
Ajmera hag complex
Pimpri, Pune 18

Problem :
First line saving into Database But Second Line not saving ie Pimpri Pune 18




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Save/Load Multiline Textbox
Hello,

I was wondering how I can save/load the contents of a multiline textbox to a .txt file...

Regards
Voltemort

Placement Of Text Within A Multiline Textbox
I have a multiline textbox that I want to place text at a certain place within the textbox (like positon x, position y). Can this be done. I have looked at sample codes that seem to do this, but not with a textbox.

Justify Text In Multiline Textbox......
is it posible to justify text in a textbox which is set to multyline?

if so how

Sending Text To A Multiline Textbox
Is it possible to append to a multiline textbox during runtime? I want to send periodic messages to the textbox, adding lines as the program is run.
Right now, it just overwrites when I use:
Text2.Text = "some comment"
Thanks.

Sending Text To A Multiline Textbox
Is it possible to append to a multiline textbox during runtime? I want to send periodic messages to the textbox, adding lines as the program is run.
Right now, it just overwrites when I use:
Text2.Text = "some comment"
Thanks.

Saving A MultiLine Textbox Into A Text File...
Hello,
Using the Print #1, text1.text to save the textbox's text in a .txt file doesn't work. It writes nothing... Anyway to fix this ?

Thanks!

Cutting Off Text In Multiline Textbox If It's Too Long
Hi, in the screenshot below you can see that if the file name is too long, then it will automatically continue on the next line. Is there a way to cut the file name off if it's too long, so it won't continue on the next line (like a listbox) ?



I know I can use scrollbars, but that makes it ugly.

Thanks.

Multiline Textbox - Viewing The Text As It Is Added
I have a multi-line textbox, to which I add text throughout the running of the application. (I suppose you could call it a log).
However, I want to be able to see the last entry on it. If this is beyond the end of the visible part, you have to use the scroll-bar.
Is there an easy way to make it so that you see the last line by default, and have to use the scroll-bar to see the first entry.

Format Multiline Textbox Text In Textfile
I have a multiline textbox(description) where the user can enter info. How can I get each line from the textbox and insert into a textfile? For now I just do a
print #1, description.text

but it doesn't stay in the format I want where each line is indented.

right now it looks like this in the file:
Description info from textbox
next line starts here
jkjkjljkjkjl

what I want is

Description info from textbox
next line starts here
jkjkjljkjkjl

Have 2nd and 3rd lines line up with the "i" in "info."
Thanks.

Aligning Lines Of Text In A Multiline Textbox
Hi,

Thanks for all your prompt help. This is a really great site, especially for where I come from where we do not have many VB users to network with.

In my app, I have a form where users key in several variables and press Calculate to get the output in a multiline textbox. This is a schedule for monthly payments, which can reach 60 lines or more.

I write the output to a string variable, broken by vbcrlf after every line, then the variable to the text box. Problem is the text is coming out unaligned, especially after from the 10th instalment, and also the amounts are all coming out left-justified whereas they would look neater on the right.

Any way to correct this problem?

Also, any proper way of coding the Print Button to apart from Printer.PrintForm?

Thanks again.


GoodGuy.

I Want Copy Multiline Text To A Single Line Textbox
i have a textbox and a comboBox in a form.
and the textbox's Multiline propty is false.
when user copy Multiline text into it twice or more ,something unusual happened.
comboBox can't display list and memery is not enough happened.
the Attach Files is the code.
someone can help me?thanks

I Cant Insert A Multiline Textbox In A Text Field Of Sql Server!
I CANT INSERT A MULTILINE TEXTBOX IN A TEXT FIELD OF SQL SERVER! I BELIEVE THE PROBLEM IS CHR(13) INCLUDED

FOR EXAMPLE:

UPDATE [MYTABLE]
SET DESC='" & txtDes.Text & "'" WHERE........

IF I PASTE THE RESULT IN DEBUG, IT HAS MANY LINES, NOT ONE.

THANKS AND SORRY FOR MY ENGLISH!

Populate Combobox List With Multiline Textbox Text?
Hi all, I'm trying to get the text from a textbox (with multiline property set to true) to populate the combobox list. Also, is there a difference in the code for non multiline?

Thanks in advance.

__________________________________

Share onto others as those have shared with you!

How To Automatically Insert Text At Cursor Position? (multiline Textbox)
I have a multiline text box. I need to insert a line of text to wherever the cursor is within the textbox without losing what is before and after the text.

I think this will require some API calls since I don't know of any VB code to do it.

Can anyone provide some insight?

Grabbing Text From Webpage Form Named Long_d To Multiline Textbox In VB6?
Hello all,

Just got an issue ..
1. Got a webbrowser control named w which fires up the page with the form2. A multiline textbox called text1.text3: Command buttons for other functions
How would you go about, grabbing the content of form from a php page which is named long_d and having it automatically load into a textbox?

Is this simple?

I was thinking maybe a command button which:
1: sets focus on webpage 'howto?2: sendkeys "{TAB 32}" ' sends keys 32 times to get to the form3: code to auto highlight the text in the form ' howto?4: code to copy to clipboard ' howto?5: code to copy to text1.text ' howto?
Is this logical?

Any Help very much appreciated!

Search Multiline Textbox And Retrive Text From The Line After Found Item?
i was wondering if anyone could help me, i am building some makeshift software for my work to improve productivity, i want to make a new fuction to search a textbox (multilined) for a specific set of Text, EG john, smith


if finds john, smith and then copys the line of text it is on and the line after it to a String so i can move it about to wherever i want.

any feedback would help alot.

Save Text In Textbox To Array
Hi all

I was wondering how exactly do i save text , that is entered into a textbox to an Array by clicking a command button? I have tried using really basic coding
What i want it to do here is basically save text that is entered into the texbox for
Student(0)
Student(1)
and Student(2)
The problem im getting is that whatever is entered into the textbox saves in every array position! not individually ...

Dim Student(2) As String


Private Sub cmdStore_Click()
For i = 0 To 2
    Student(i) = txtEnter.Text
    txtDisplay.Text = Student(2) ` i used this as a checker basically , to see whether it                     displayed correctly
Next i

End Sub

As soon as i enter text in the textbox the Displayer displays what i entered.. but it shoudlnt because i said it to display Student(2) , which is what will be entered lastly ... but yea , its in a loop so im not really sure how to end it as well....
its a really simple problem , but ive probably made it stupidly complicated ....

Thanks

I Need To Save A Textbox's Text To Binary File
im using some code i found to read in a binary file into a text box and display its hex value (0-9, A-F(G?))
now im allowing a user to change this text, but i have to find out how to save it back into a new binary file
ive searched and search but still cant do this right

previously i edited a section of one to replace the hex with a slider value which worked fine (i think) because i could use hex(slidervalue) but i cant use hex() with the letters can i?

im reall stuck on this, sorry if people have asked before, i couldnt find any posts that helped me

thanks

Save Word Document As Textbox Text And Date?
How can I save a word document as text from a textbox and todays date automatically and without getting messages then close MS Word.

Let's say textbox1.text has number 1 in it, when I click on a commandbutton1 it closes the document as 1_12-17-03.

I use VBA.

Thank you very much.

How To Save/read Textbox Text To/from Notepad File
Pls show me that how to save/read textbox text to/from notepad file. urgent please help me......

How To Copy Text From A Textbox & Save It To New .html File?
I would like to know how I could copy the text out of a text box and save it to a file.

If possible save it to a directory I can specify and the extension would be .htm.

Is this possible?

Thanks for any examples or code

MultiLine Textbox
Hope someone can help...
I have an Excel sheet with cells conteining multiline text (with "enter" between lines...). The problem I face is when running this code:

TextBox25.Value = Sheets("HW failures - Open Issue").Cells(ActiveCell.Row, 1).Range("M1")

My Excell will hang completly and I need to kill it and start again

PLEASE HELP!!!

MultiLine Textbox
Can anyone tell me how I show lookup/offset results as line entries in a multiline textbox.

The following code brings up 5 address lines that I want to show as seperate lines within a textbox, but not sure how to use code to enter down to the next line:


Code:
Private Sub CommandButton1_Click()

Dim rngFound As Range
Dim rngSource As Range
Dim strSearch As String
Dim strDesc As String
Dim strDesc1 As String
Dim strDesc2 As String
Dim strDesc3 As String
Dim strDesc4 As String


Set rngSource = Worksheets("LUGGAGECUSTOMERS").Range("B2:P675")

strSearch = AcctNo.Text

Set rngFound = rngSource.Find(strSearch)

If Not rngFound Is Nothing Then

strDesc = rngFound.Offset(0, 1).Value
strDesc1 = rngFound.Offset(0, 2).Value
strDesc2 = rngFound.Offset(0, 3).Value
strDesc3 = rngFound.Offset(0, 4).Value
strDesc4 = rngFound.Offset(0, 5).Value

Else

strDesc = "ITEM NOT FOUND"

End If

InvAdd = strDesc & strDesc1 & strDesc2 & strDesc3 & strDesc4

End Sub

the strDesc, strDesc1, srDesc2 etc. need to each be on a new line

MultiLine TextBox Help
Hi, im working on a game which is a hacking simulator, you type the commands into a multiline textbox which is on the 'Console', When you first start a timer enables, then it displays a welcome message,then disables. then timer2 enables, Displays a new message then disables, but it deletes the other message, how do i get it to go onto the new line and not delete everything else

Multiline Textbox
I'd added scrollbars to my texbox and when the user sends an input i want the text box to show the item, but when it does this the user sees the top of the textbox, the user has to scroll down and read then when another input comes once again they have to scroll down n read... help! i want them to see the bottom of the textbox...

TextBox Multiline
hi all how do i insert text into a multiline textbox on the form loads?

Multiline Textbox Help
How do you get an event function to read the next line of a multiline textbox?

for example:
When I press the cmdEncrypt button I want the program to read the last line of text in the multiline textbox.

Thanks in advance
smb

Multiline Textbox
Quote:





Originally Posted by 00100b


Set the SelStart property of the TextBox equal to the length of its Text property after adding the new entry.

Code:
Me.Text1.Text = Me.Text1.Text & NewEntry & vbCrLf
Me.Text1.SelStart = Len(Me.Text1.Text)





Edit by 00100b: Split from hijacked thread
Can anyone tell me why this code does not move the cursor (display the last line) to the end of the multi-lined text box?

Thanks,

PT


Code:
Private Sub Form_Load()
Dim Count As String
For Count = 0 to 30
Rnd -(Count + 2)
r = Rnd
Text1.Text = Text1.Text & vbCrLf & r
Next
Text1.SelStart = Len(Text1.Text)
End Sub

Multiline Textbox
i got a textbox (text1) and the .multiline property is set to true.
how do i find how which line is the textbox on?

may be easy but i never used multiline property before

Multiline Textbox
I want to add the text from several textboxes to a multiline text box.
Text1.txt should be in the first line of the multiline textbox
Text2.txt should be in the second line of the multiline textbox.
How do you accomplish that?
I mean mulitlinetext.text=text1&text2 will just put the after eachother.

Multiline TextBox To SQL
I have a multiline textbox (txtMeterNum) and two singleline textboxes (txtDate and txtBatchNum). From a scaner we scan meter numbers to a .txt file, with a timer we put these numbers in the multiline textbox. They apear each in their own row. All of these must be updated to a SQL database with the same Date and Batch number as in txtDate and txtBatchNum. so if there are 10 meter numbers then there must be 10 new records with 10 diferent Meter numbers al with the same date and batch number.
I used ADODC

Multiline In Textbox...
Hi. I want to display multiline messages in a textbox as follows:

Private Sub Form_Load()
Text1.Text = "first line" & vbCrLf & "second line"
End Sub

This did not work. How do I display more than one line in a textbox. Thanks.

Multiline Textbox
Hi All
I want to make multiline textbox, but I don't know how to set text to multi line. I used chr(10) but it's con not go to next line. can you tell me how to next line?

thanks in advance

Multiline Textbox
in a multiline textbox how will i locked specific words so it wont be change by the user or encoder:

this is an example to show how i want it worked

IP Address
192.1.2.3.4
User
root
Password
123456

Legend
Red Text = these are the words that can't be change by the user

Blue Text = these are the things that can be change by the user

i hope you understand what i want to say...

MultiLine TextBox!
I am using a MultiLine TextBox. I want that only if the text in the TextBox, which is pre-written but will be different for each user, exceeds the height of the TextBox then only should the vertical scrollbar be displayed otherwise the vertical scrollbar should remain hidden. How do I do this?

Setting the ScrollBars property of the TextBox to 2 - Vertical always renders the vertical scrollbar even if the entire text in the TextBox doesn't exceed the height of the TextBox.

Note that the TextBox is Locked i.e. it is read-only.

Thanks,

Arpan

Multiline For TextBox
Previouly I used picture box to do multiline texts, and it prints new line without deleting the previous line, unless I used cls.

Example code;

Picture1.Print "Text1"
For i = 1 To 3
Picture1.Print Matrix1(i);
Next i

It shows

Text1
1
2
3

To clear the picture box i used,
Picture1.cls

How can I use TextBox.Text to
- do multiline without rewriting vbNewLine or vbCrLf many times
- keep the previous line

Tq

MultiLine TextBox!
Both the images below are of the SAME MultiLine TextBox.



In both the images, Sentence4 comes immediately after Sentence3 but in the 2nd image, it looks like there is a line gap (if I may call that} between Sentence3 & Sentence4 i.e. in the 2nd image, instead of Sentence4 getting rendered immediately after Sentence3, there is a blank line.

Similarly, in the 1st image, though Sentence4 is the last line in the TextBox, a blank line has been left after that.

How do I avoid these blank lines?

Thanks,

Arpan

Textbox Multiline
How would I add multilines in a text box with code, I have multilines enabled.

Example

Text1.Text = "1,2,3"
How can I make it display on the text box

1
2
3

Textbox - Multiline
I have a textbox . I have set maxlength of characters to 100. I have set it to multiline.

I want to restrict my users from typing more than two lines of text in my text box

How can I do that

thnks

Multiline Textbox...
My form captures the enter key and sends tab. Theres a multiline textbox which I dont want to process the form_keypress event. Anyone know the way of doing this? I tried adding some code in the textbox's keypress event but it does not fire. Thanks

Multiline Textbox
Is there a way to read one line at a time and and run some code then go to the next line read that in and then run the code, ect. there is something like this for reading from a file so i thought maybe there would be for a textbox as well. thanks in advanced for the help

MultiLine TextBox
I have a TextBox that allows multiple lines. I need to be able to limit each line to only 30 characters. How can I achieve this? Thanks, Jeremy

Help! Multiline In Textbox
hi,

I'm trying to put multilines in a textbox.
textbox multiline property is set to true.

how do I add text as a new line in form_load ( )?

for example, ("
") is C syntax:
text1.text = "Line1" & "
" & "Line2"

thanks

Multiline TextBox
If you are adding lines of text to a multiline text box with a verticle scroll bar, how do you make each new line of text get printed to a new line? Do you just add some sort of return character at the end of each line?

MultiLine TextBox
I use KeyPress event to SendKeys "{Tab}" when Enter is pressed instead of Tap to move to the next TextBox. But I want my MultiLine Textbox to move to the next line if user press combination keys of
CTRT+SHIFT. How can I do this?

Multiline Textbox
Okay.. probably another idiot question.. but.. how do I get back to line1 of a multi line Textbox after sending data from it..?

This is how my code works so far:

Private Sub Text1_KeyPress(KeyAscii As Integer)

If (KeyAscii = 13) Then
strVariabe = Text1.Text
Text1.Text = ""
End If

End Sub

However.. after pressing Return and sending the data to strVariable, and clearing the text box.. it always returns to line2 of the box.. while I want the entry point back at the start of the text box.
I hope this makes sense.. it's driving me crazy!!!

MultiLine In A TextBox
I have a TextBox with MutiLine set to True and ScrollBar set to None. I want to limit the number of lines the users can enter into the TextBox. Does anyone know how to get the number of lines in a TextBox? I have tried several ways and none of them worked.

Thanks

Multiline TextBox
I have a project in which I create all my controls at runtime with the assistance of a database to load the properties of the controls ... I have recently hit a dead end though, a TextBox's MultiLine and Scrollbar properties are read-only at runtime. This sounds very stupid to me to begin with, why would you make those read only when you know that people will want to switch back and forth in an application at runtime? Anyway ... I was wondering if there was some API function to set these properties? I really *must* set these properties with code. Any help is appreciated.

Multiline Textbox
Anybody knows how to read each line seperately in a multiline textbox?

Copyright © 2005-08 www.BigResource.com, All rights reserved