Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting info from list box to text box

Status
Not open for further replies.

ramondrumon

Programmer
Sep 5, 2002
33
US
I have a text box that can take 3 lines of information, I have a list box that when I click on a row the info is inserted into the text box, then I click on another in the list box and it is inserted too. My problem is that when I insert some info to the text box, the info can be broken in half with some on one line and the rest in the next line. I would the info to stay together. This is my code.

fillit = fillit & Me![LstBxSubmittalNo].Column(0, LastName) & " " & "(" & Me![LstBxSubmittalNo].Column(1, LastName) & ")" & "," & " "
 
add vbcrlf where ever you want a new line
line1 & vbcrlf & line2 & vbcrlf & line3
 
I did not make myself clear, the text box automatically starts a new line, but I don't want the next string to be on two lines if it is to long, if the 1st line is about full, I want the next string I insert to stay together and go to the next line.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top