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




Carriage Return And Line Feed Guitar Notation


I am trying to write a program that will insert the guitar chord above the text where it is to be played i.e.A c# BGuess who just got back today them wild The problem is, I want to be able to type all the words in the song then set the cursor on say the t in just(see above line) and right click which will bring up a menu that I can pick the chord from (this I can do) but when I insert, it puts the carriage return in and inserts the c# at the beginning of the line. Any ideas on how to keep the location for the insert? Once the carriage return is done on a particular line then all I would need to do is insert at and above current cursor location.Thanks in advance------------------Troy MacPhersonCustomer Suport Software Analyst t_macpherson@yahoo.com




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Carriage Return And Line Feed
Hi,

I'd like to know how to insert a carriage return and line feed on a frmDisplay from frmMain. This is my code to insert carriage return and line feed. frmDisplay contains txtDatalog.

frmDatalog.Show

With frmDatalog

.txtDatalog.Text = .txtDatalog.Text & "IFR Datalog for DUT " & k & Chr$(13) & Chr$(10)
.txtDatalog.Text = .txtDatalog.Text & DLogStr(k)


End With

by the way, DLogStr(k) is a string that contains Chr$(13) & Chr$(10) at the end of each line.

Carriage Return + Line Feed
I am writing to one text file, the only problem is that everytime i save i have data that is overwritten in the text file each time i save.


VB Code:
Private Sub Command1_Click()     Dim File As Integer        File = FreeFile    Open "C:Documents and SettingsCarlDesktopToo AddDD est.txt" For Output As #File        Print #Handle, Text1.Text    Close #Handle   End Sub


How can i adapt this code to add a new line each time i save to it.

Jenova

Line Feed && Carriage Return
I’m reading from one file where its text has a line feed character in the middle of it. When the text gets to the output file, I find a line feed AND a carriage return. Normally this wouldn’t be a problem but the text contains PCL (Printer Control Language) code. The carriage return is causing a problem when the output file is printed. The only functions that I perform on the text are mid and trim, which are no where near the line feed. Any ideas on how I could be picking up the carriage return and how to stop it from happening?

Carriage Return/line Feed Character(Hex #0A And Hex #0D)
Hello

I am writing contents in a text file using File System Object like this


Code:
tso.WriteLine "FIRST LINE"
tso.WriteLine "SECOND LINE"


I am sending this file to some one who is one Unix/Linux server and problem is it is not properly reading carriage return/line feed character. I got a response from them that the CR/LF character in my file is actualy Hex #0A and it should have been Hex #0D!!

I sent the file again this time using a little bit different code as follows:


Code:
tso.Write "FIRST LINE" & vbCrlf
tso.Write "SECOND LINE" & vbCrlf


But this doesn't work either as they have told me. How do I make sure I use Hex #0D instead of Hex #0A in VB6/vbscript?

Whats A Carriage Return Line Feed?
Whats a carriage return line feed?

Joining A String Which Is Split By Carriage Return Line Feed
Hello,

I'm stuck in a situation now..I hope someone out there can help get me out of it...here's the situation:

I now have a string as follows:

abcstring =

ABCDEFG
HIJKLMNO
PQRSTUV
WXYZ


how am I able to join all the strings to form a string

ABCDEFGHIJKLMNOPQRSTUVWXYZ

i.e. delete off the carriage return line feed


Thanks in advance!

Joe

Replace Carriage Return / Line Feed In MS Access Table
I have a table with a memo field that contains a unique character (set of characters, actually: "|||") that I need to replace with a carriage return/line feed.

The search and replace utility within Access will not let me use special characters (will it?), and I cannot import the text without it spitting in that funky (r) character in place of the existing carriage returns.

I thought there might be either an easy way to do this, or a function that can be written that will search through the contents of a field in all records of a table and replace the "|||" with a Chr(10)+Chr(13).

Any advice is greatly appreciated.

Thanks,

ashorr

Next Line (Carriage Return/Line Feed)
Hi Everyone,

I used to make programs, then stopped. However, I needed to make a program to help me with something I've recently tried doing with pen and papaer and have learned that just won't do, haha

Anyway, I found the coding for an old program I made in 2003 with VB 4.0

I now have VB 6.0, and have used my old program as a huge stepping stone because it had much of what I needed already done.

Basically, the program I'm needing to make it to store some info into a file, then have it recall it, search and so forth.

Here's my question though. So that I can have it better organized, when I recall the info, I want each piece of info to be on another line (it's being viewed in a text box). Such as:
Name: _____
Ref: ______
Date: ______
and so forth.

It's written to the file, with "|" (or ansi value 124) separating each piece of info. I figured that I could just recall it and when I want to view the info, I can replace the "|" with the "chr(13)" and "chr(10)". Here is the portion of the code I figured would do the trick . . . but it's not working out. Can anyone tell me if something is wrong with the coding below (or if you need more of the coding, let me know)? I know I can easily have it write the line breaks into the file and just recall it and it'll work, but I'd rather see about it this way . . .

Please bare in mind that I stopped making programs 4 years ago, and was then using vb4 and am now using vb6. I'm not fully brushed up on programming, so I am a bit of a novice again. Any and all help is appreciated, Thanks!

Here is what I thought would work . . .

VB Code:
Do While i < UBound(VScripture)i = i + 1   If Scripture = Left(VScripture(i), LookFor) Then    c = 1         'Replacing the | with a Carriage return, and line feed, to put it on a new line    Do While c <= Len(Trim(VScripture(i)))    char = Mid(VScripture(i), c, 1)        If char = Chr(124) Then            char = Chr(13) & Chr(10)                    End If    c = c + 1    Loop            'End Replacement   TxtNotes.Text = TxtNotes & Chr(13) & Chr(10) & VScripture(i) & Chr(13) & Chr(10)   End IfLoop


Please forgive me for my ignorance, but I really would love to have some help with this. Also, if there's an easier, shorter way (newer coding for vb6?) that would do the trick, please let me know . . . so long as it's explained fully to me and isn't so far fetched that I would get lost in it.

Thank you, again, for your help! I patiently wait for your replies!

Help With Carriage Retrun And Line Feed Characters
I'm using Visual Basic 5.0 which I know doesn't have the Replace
Function ability. I have a user form with 12 textboxes that can have
multiple lines of data in each textbox, which I then send each boxes
data to it's appropriate DOCVARIABLE in a Word doc. When I open the
Word doc I see little square boxes representing carriage return or
line-feed characters, I'm not sure which ones they are. What's a good
way to get rid of the all the carriage return or line-feed characters,
so they don't appear in the Word doc.? And, the second part of my
question is when I retrieve the DOCVARIABLE data from the Word doc and
send it back to its appropriate textbox in the userform, it displays a
"|" (pipe symbol in UNIX) wherever the carriage or linefeed character
was in the textbox. So, what's a good way to get rid of that symbol??
Basically, I'm sending data from textboxes on a userform to
DOCVARIABLES in a Word doc. and then back. I'm using the Word doc.
DOCVARIABLES to store information that's updated numerous times in a
day using the userform. I hope someone can help me with this problem.

MsgBox Showing All Multi-line Footnotes That Have Carriage Return At End Of Line
Can I tell Word via VBA to show me all the footnotes that erroneously
have a carriage return at the end of multi-line footnotes. ?
To be more specific there are still people who press enter at the end
of a written line instead of let Word do the line break
automatically.

The MsgBox should say for example:


Footnote 1: carriage return, page 7
Footnote 2: carriage return, page 9
etc.


Could please somebody give me a hint ? Thank you very much in
advance.


Regards,


Andreas

End Of Line And Carriage Return
Hey guys,

I am reading data from a .csv file into a text box. In the textbox columns are seperated by commas but the rows are seperated by a character that I do not recognize-it looks like two pipe symbols "||". I think it may be a carriage return or end of line symbol. I want to search this string for a particular instance of this character but I don't even know what the char is and I can't copy and paste it from my text box to my Instr() function as it only advances the cursor to the next line when I do. Does any one know what the correct syntax for this character?

Carrage Return - Line Feed Question
I am having a problem with end of line character
the file that is being sent from me is being ftp to one of my unix servers
I then read the file in VB script (below) which allows printing of selected drawings

i have to run a command ux2dos on the unix side to be able to use the file
once i run this command i am able to use the file
it looks like it is putting ^M at the end of each line and a ^Z at the end of file

i think the ^M is a carriage return and ^Z is end of file

maybe the way I am reading the file in is not correct

any ideas would be helpful

thanks


Private Sub searchinterplant()
Dim vitemtofind As Variant
Dim vsearchval As Variant
Dim vdrwtofind As Variant
Dim testfile As String
Dim xxfile As String
    Dim i As Integer
    Dim xfile As Integer
    Dim name As String
    Dim strpartnum As String
    Dim strPartNumber As String
    Dim strPartNumbernew As String
    Dim strDescription As String
    Dim strDescriptionnew As String
    Dim strdesc As String
    Dim strtmp As String
    Dim strqty As String
    Dim strqtynew As String
    Dim strquanity As String
    
    Dim strVerRev As String
    Dim strStatus As String
    ListView1.View = lvwReport
'arone = ListBox1.ListCount - 1
Dim itmX As ListItem
Dim itmY As ListItem
Dim itmval1 As Variant
Dim itmval2 As Variant
Dim PauseTime, Start, Finish, TotalTime
Dim myarray(100, 50)

Dim arySplit As Variant
Dim aryBlankSplit As Variant
Dim strYourString As String
Dim strRet As String

Dim regePart As String
Dim regeDescr As String


Dim strString As String
Dim varPart As Variant
Dim varDescr As Variant

    i = ListView1.ListItems.Count + 1
    xfile = FreeFile
    

      On Error GoTo err

  'sonum = Text1.Text
'Dim ordernumstrArray() As String
'Dim ordernumstrSplit As String: ordernumstrSplit = sonum
'ordernumstrArray = Split(ordernumstrSplit, "-")
'num1 = ordernumstrArray(0)
'num2 = ordernumstrArray(1)
'num3 = Right(num1, 1)
'programsonum = num1 + num2

    
    Open "Y:" + Text1.Text For Input As #xfile
    'Load integer values MyArray
    Dim strArray() As String
    Dim tmpstrarray() As String
    Dim tmppstrarray() As String
    Dim partdescarray() As String
    Dim rbarray() As String
While Not EOF(xfile)
    ' Obtain the data line
    Line Input #xfile, name '<=CHANGED
    strArray = Split(name, " ")
    'tmpline = stripextrachars(strArray(1), Chr$(32))
    'partdesc = stripextrachars(strArray(1), Chr$(32))
    rbarray = Split(tmpline, " ")
    'dwgsize = rbarray(0)
    
    partnumber = strArray(0)
    'qty = rbarray(2)
    'linetotal = UBound(rbarray)
    'For i = 3 To linetotal
        'partdesc = Mid(partdesc, InStr(1, partdesc, " ") + 1)
        'partdes = partdes + rbarray(i) + " "
    'Next
    
    
    Set itmX = ListView1.ListItems.Add(, , partnumber)
    ' Then generate its sub-items
    itmX.SubItems(1) = qty
    itmX.SubItems(2) = partdes
    'itmX.SubItems(3) = strStatus
partdes = ""
    
Wend
    Close #xfile

    With ListView1
    For x = 1 To ListView1.ListItems.Count
        ListView1.ListItems(x).Checked = True
    Next x
    End With

Exit Sub
err:
   MsgBox (err.Description)
  'Exit Sub

End Sub

Carriage Return In A Multi-line Textbox
I'm feeding the contents of arrays one by one into a text box. After the first element of each array has been entered into the text box, I add the 2 element of each array on a new line. It's not the entering of the data that's the problem; that's easy (of course). I don't know the command for a return (next line). I know that 'vbNewLine' is a way of inserting a new line when entering text in such a way, but if I do this and then move on to entering the next data, will the carriage return remain? I've seen other ways of entering a new line but I can't remember them, nor can I find them.

Carriage Return In Multi Line Text Box
Can anyone PLEASE help me with this problem :

I have a multi line text box in a form that I am trying to fill with information programatically.

I am putting the contents of various database fields for customr name and address into the text box and I want a RETURN between each line.

I am creating a string like this at the moment :

string=field1+chr$(13)+field2+chr$(13)+field3 etc...

But when I assign the .Text property of the text box to this string it all appears on one line !

By the way, I also want to do the same to a Memo field in an Access database.

Any ideas ?

Code Carriage Return In Mult-Line Textbox
I have a multi-line Textbox setup that I am trying to add an address to through by code, however I cannot seem to enter correctly. Can someone please hlp, this is what I tried. Thanks!


Code:
txtMail = Recipient + vbCr + rsSpouse!StreetAddress + vbCr + rsSpouse!City + ", " + rsSpouse!State + " " + rsSpouse!ZipCode

Reverse Form Feed/line Feed In Dot Matrix Printers
hi all
is it possible to do reverse line feed printing/form feed in vb, like it should be down then across.
i need to print the contents down at first by completing the page the printer has to reversed at begining of the page, if it is possible lot replies will be helpful
cheers
parthi

Text File "carriage Return At End Of Every Line"
i have written a program which dloads data from a website and saves it to a text file. now a problem is i need to have that data on seprate line and the text file has a box like seprator at end of each line

how do i make my program identify the box as a end of line and put the data on seprate line

im attaching the output text file here with the post

Feed The Window A Return
Hi,

Does any know the code (in VBA) to feed a carrage return to a window. I.e. I have a macro that does something, but unfortunately one of the things it does is pop up a warning message... the answer to that pop up is always yes, so i want to add a line of code to the end of the macro that does this...

anyone??

TYIA

Pile

Carriage Return
Very late/early
need sleep
quick dumb stupid question


What the Vb command for a Carriage return in a lable name LblDescription?
vbCR or something?

Carriage Return
hello !!

i'm trying to read a "memo" data type and write it to an asp.NET page. i would like to use a replace function to replace the carriage returns by "<br>".

however i don't know the C# constant for carriage return. i think it's vbCr in VB.NET, but i can't find the C# equivalent.

if anyone knows, thanks for letting me know

huby.

Carriage Return
How can I stop a user from pressing the carriage return / enter button when typing in a textbox?

I tried checking for chr13 but not sure how to stop the user from hitting it accidetly.


thanks

Carriage Return
Whats the vb keyword for a carriage return?
Ie Text1.Text = "Blah" + CR + "Blah"
What do I change CR to?


Thanks in advance

Return Carriage
Im doing a simple text filtering program. user enters info and... fo rexample it will pick out the words begining with b's. im using a multiline textbox for input. how do i get the program to recognize a carriage return if the user decides to sperate the words by hitting enter?

right now i am taking the text box and reading it as 1 string. it recognizes blanks to seperate the words.

it is a college project so i understand how over simplified it is. however the info is useful




Private Sub cmdFindBs_Click() 'main program

'declare local variables
Dim Words As String, NextWord As String
Dim blank As Integer, Foo As Integer

Words = txtInput.Text 'get text from textbox
blank = InStr(1, Words, " ") 'find first blank

While blank <> 0 'continue until no more blank spaces
NextWord = Left$(Words, blank - 1) 'isolates word
If SeeIfB(NextWord) = True Then
'checks if word begins with b
lstDisplay.AddItem (NextWord) 'add word to lstbox
End If

'trims string of first word
Words = Right$(Words, Len(Words) - blank)

'find next blank
blank = InStr(1, Words, " ")

Wend

'handles last word
NextWord = Words
If SeeIfB(NextWord) = True Then
lstDisplay.AddItem (NextWord)
End If

End Sub


Private Function SeeIfB(ThisWord As String)
Dim B As String 'declare local variables

B = Left$(ThisWord, 1) 'if word begins w/ b return true
If B = "b" Or B = "B" Then
SeeIfB = True
Else 'else return false
SeeIfB = False
End If

End Function

Carriage Return
How do I force a carriage return in a text box in between strings?
This is my code

If optMenu = 0 Then
txtChoice.Text = cboRegularStarter.Text
txtChoice.Text = cboRegularMain.Text

etc.

How can I force "txtChoice.Text = cboRegularMain.text" to be printed on a new line underneath "txtChoice.Text = cboRegularStarter.Text"

I would appreciate any help on this one. it is probably a very simple solution and I am just being stupid.

Thanks.

Carriage Return In VB
Can I perform a search on a string and do a replace with a carriage return character and create different lines within the file.. (to allow for records to be separated)

Carriage Return.....
If I have a string that is 100 words(not characters)long, is there a way when that string (from a rich text box) is printed or emailed to determine where the carriage return will happen and that on the next line to add spaces before the rest of the string for an indention? Hope this makes sense.
Cady

Carriage Return In VB
Hi All,

I have created a script that parses throught a file with a fixed length row
of data. I am using the TextStream to write certain data to another file
that will be processed through another application. The trouble that I am
experiencing is that at the end of the file, it is writing an extra CrLf
which when it runs through the application, chokes. Any information or
hints on alternatives would be very much appreciated.

Thank you in advance....

Kevin Baker
S/W Applications Developer I
Mutual of Enumclaw Ins. Co
(800)366-5551 x3471

Carriage Return In Field Value
Hello. I have a form set up. I have read in values from a text file and assigned them to variables. The form is a Fax. In the "From" field, I want to put:

Name
Title
Department

Only problem is, I only want the Title and Department to show up IF they are not blank. I'm trying to combine all three into one string or variant variable and then assign that variable as the "result" of the field. It looks like:


Code:
ActiveDocument.FormFields("Name1").Result = inName1 & vbCrLf & inDept1
If I use "vbTab", it works fine, but when I use "vbCrLf," I get a box instead of a carriage return... its the same type of box you get when you're looking at font substitution and the program places a box in the places of a character it doesn't know how to substitute. Any suggestions???... aside from separating these into separate fields?

Remove Carriage Return
I have imported data which has cells with squares in them representing carriage returns. I recorded a macro to replace "xxxx" with a space and then changed the:

What: = "xxxx" with
What: = chr(13)

This did not work. I can't use clean because that will just remove the carriage return whereas I need it to be replaced with a space.

thanks

How To Get Rid Of Those Carriage Return Boxes?
I take the text from a text box which has enters in them.

485 Rural Drive*
Toronto, Ontario*
M6R 7F7


I get little squares where the stars are. Ive read that they are ascii characters or line return characters. Whatever they are i need to get rid of them. Any solutions or links to other posts? Thanks!!!

Carriage Return In Textbox
Does anyone know how to insert a carriage return in a textbox using the keyboard. I thought it was Ctrl+Enter or Shift+Enter... but no luck.

Thanks,

Marcie

Carriage Return For Notepad
Hello all,

I am using VBA to write a program in excel, at the end of which is a program that writes an error report to a text file in notepad. There are already preprogrammed strings that are passed into this function and then simply output as strErrors for example. I was wondering how I can get a carriage return in this string that is passed into the error function. I have tried to use Chr(8), but it just shows up as a block in the text file. That is the only carriage return I know in VBA.

Thanks!

KUBBALL

Opposite Of Carriage Return
Hi All!

I sending strings to a text box like this

AbC: 123
CDE: 456
FGH: 789
*

and i do it by adding a carriage return after my string
Now the cursor is at the (*) and i want to go back up one line and delete the FGH: 789 .. i did learn how to delete using (len) but i dont know how to go back up one line.. please help!!


thank you

Carriage Return In A String!
I know this is an easy question but... In a string how do you insert a carriage return or new line character??? I know it is a VB constant but I don't know which one. I am using it in a message box to move down to the next line.

Carriage Return(enter Key)
hi you all

can anybody help!!

I'm trying to check for the enter key been pressed and for some reason it does not work. if I change the 13 to 32(space bar) it works fine what i'm i doing wrong.

All i want to do is change the updown1(control) to the value of the Text1.Tex(control).


Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
response = MsgBox("dsdf", vbOKOnly, "dfg") 'just to see if it works
UpDown1.Value = Val(Text1.Text)
KeyAscii = 0
End If
End Sub
thanks the pig

Immediate Carriage Return In Listboxes
I'm not sure if it's possible, but is there a way to have a command enter a return after a statement is added to a listbox, so that the next line entered is on that line? I've been doing it with bunches of spaces and MultiLine set True, but that just seems to make a mess.

Thanks

Parsing Looking For Carriage Return
I am loading in a string that contains several ascii representations of the Carriage Return. How would I parse through it and where the Carriage Return Ascii is replace it with a vbCrLf.

I am not good at parsing at all, in fact its my weakest areas...



So here is my example to the best of my ability without knowing the ascii code for the carriage return.

hello world||I am doing fine||hope you are too

Now I want to take that string and parse it so I can place it into a Textbox so it looks like this:

hello world
I am doing fine
I hope you are too

Carriage Return Replacement
I have another newb question for you guys. I have a form variable (txt_textfield) which the user enters information into as a comma (,) delimited list. Problem is that when I load this list into an array, the carriage returns, spaces, and such are getting sent with the value. I am looking for a way to remove all spaces in the string and all carriage returns.

Replace(txt_textfield, " ", "") should get rid of the spaces.

but how do I remove all carriage returns and line feeds?

Carriage Return In ToolTipText
Good Day,
I wa wondering if it was possible to jump a line when editing the ToolTipText attribute of an object at runtime.

Chr(13) & Chr(10) does not work

Many Thanks

Checking For Carriage Return
I have a text file that i loop through....at the end of the file is a carriage return. I need to check for that.

I have been doing this to check:


Code:
If Val(Transaction.MachineNum) = Val(vbCrLf) Then
'DO SOME PROCESSING
End If

This worked fine until I realized that I need to error check for Transaction.MachineNum. If Transaction.MachineNum has an alphabetical character in it...then the Val function sets it to 0. and Val(vbcrlf) is also 0.....so this is a problem.

Is there some other way to check for a carriage return?

thanks,

b

Email && Carriage Return
Hi,

I have read through various messages on this topic, but can't seem to find the answer I'm looking for.

Basically, I need to create an email from various information calculated and displayed in numerous textbox in VB.

I have no problems creating the email, but when it comes to the carriage return (or changing lines) I can't seem to getting it to work

The code I have been playing with was posted previously, and works great, but like I mentioned the carriage return bit has me stumped.

[[[[ code ]]]]

Private Sub Command1_Click()

Dim objOutlook, objMsg, objNameSpace, objFolder, strOutput, strSubject, StrTo, StrMsg, Strcc
StrTo = "me@abc.com"
Strcc = "you@123.com"
Const olMailItem = 0
Set objOutlook = CreateObject("Outlook.application")
Set objNameSpace = objOutlook.GetNameSpace("MAPI")
Set objMsg = objOutlook.CreateItem(olMailItem)
objMsg.To = StrTo
objMsg.Cc = Strcc
objMsg.Display
objMsg.Subject = "This is my Title"
objMsg.body = "this data on 1st line"
' ## now this is were I get stumped, how do I get the following
' ## information on a different line.
objMsg.body = "this data on 2nd line"
objMsg.body = "this data on 3rd line"
objMsg.body = "this data on 4th line"
objMsg.body = "this data on 5th line"
Set objFolder = Nothing
Set objNameSpace = Nothing
Set objOutlook = Nothing
Set objMsg = Nothing
Set ss = CreateObject("WScript.Shell")
Set ss = Nothing

End Sub

Thank-you for your help, I guess the solution is simple, but I can't seem to find it any where.

Thanks Again & Rgds,
Dan.

How To Insert A Carriage Return
Hi.

I am making a evaluation form. In this evaluation form you can insert opinions.

In the administrative form, you can see the evaluation of one day or the evaluation of several days.

When you choose the evaluation of several days, i need to display from the database all the opinions in that days.

I will display all the opinions in a textbox with the multiline option avaliable and the scroolbar.

But how can i make to display the first opinion and then insert a carriage return, but i need to make this in code.

My code is something like that


text1.text = rs("date") & " :" & rs("opinion") & 'here the carriage return.

I know is so simple the answer but i don´t know how to do it.

Regards.

Efrain Israde
Mexico City

Delete Carriage Return
how do i delete a carriage return?
when i open notepad i'm unable to see the carriage return's symbol
i wan my cursor to stay at the end of the file

Carriage Return In A Label
Hi.

How do I denote a carriage return in a label?

For example, lblText.caption = "


TEXT APPEARING HERE


"

Thanks,

David

Detect Carriage Return
I start this topic as a new thread, in a multiline textbox, is there a way to detect carriage return?
or when reading a line from txt file, how to detect whether cr exists in that line of string?

Carriage Return Character
I am writing multiline text data into a database then transferring the data into an Excel report template, but anytime I have a multiline entry the printout includes a carriage return identifier. It looks like this:

-Data1|
-Data2|
-DataDataData|
-Data3

Anyone know why this is and how to remove or disable it?

Carriage Return Problems
Hi have written a small application that has a few text boxes for outputs, the output looks like this: 1.jpg

when i print it out the printer recognizes the carriage return in the text boxes and will print out a long line over 2 pages, instead of across the page like it should.

If i enter text manually without a carriage return it will print out across the page, i have tried to use vbNewLine instead of vbCrLf but its still the same, has anyone any ideas as to how i can make the printer recognisze a new line only after the carriage return on last text box?

If i tried:

text3.text = text3.text
text4.text = text4.text etc....
Would this remove the carriage returns? (havent tried it yet as im about 5 hours away from my printer!!)

Thanks

Text Box With Carriage Return
hello all,

I wanna create a text box once i display a text on it the format should look like this,

text1
test2
test3

i can do this by using the textbox property MultipleLine=true

but i'm wondering if it's possible to do this by code.

for example i have a table. in a table i have ID# & text fields
in ID# I have two records with same ID (not primarykey & allow duplicate) and Text field i have 2 diff text, let say tex1 & text two.

i create a recordset querying by ID#. i want to display the TEXT field in textbox showing all the data...

i hope this is clear.


i am hoping to have same result as i mention above. i have a codde. i don't know if this will help...

code sample:
================================

Dim strSelected As String
Dim i As Integer, strItems As String

gstrSelected = Me.lstTransID.List(lstTransID.ListIndex)

SQL = "select * from tblShipping where TransID='" & gstrSelected & "'"
Set RS = DB.OpenRecordset(SQL)

'Always clear the textboxes
Me.txtReceiver = ""
Me.txtItems = ""
Me.txtWaybill = ""

'Assign the value from recordset
Me.txtReceiver = RS.Fields("Receiver")

strItems = ""
RS.MoveLast
RS.MoveFirst
For i = 1 To RS.RecordCount
'strItems = RS.Fields("ItemDescription")
strItems = strItems & RS.Fields("ItemDescription") & Chr(13)
RS.MoveNext
Next
Me.txtItems.Text = strItems

Carriage Return - VbCr
How do you get a carraige return to MSWord output?

I am using...

VB Code:
FrmEndsSz = "something" & vbCrlf &  "something next line"

but the document is returning two squares where the carriage return should be.

When I use...

VB Code:
FrmEndsSz = "something" & vbCr &  "something next line"

but the document is returning one square where the carriage return should be.

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