Put a carriage return in text 
Author Message
 Put a carriage return in text

I have this piece of code that places the text
"Part 6 of the (excluding section 100 & 101)" on a report
Does anyone know how i can get a carriage return in after
"Part 6 of the" so the rest of the text goes to a new line?

The relevant code is

Private Sub Detail_Print(Cancel As Integer, PrintCount As
Integer)
Dim sActs4 As String

If chkGas.Value = 2 Then
        sActs4 = sActs4 & "Part 6 of the (excluding
section 100 & 101)" & vbCrLf
    End If
LblActs4.Caption = sActs4
End Sub



Tue, 23 Aug 2005 09:02:37 GMT  
 Put a carriage return in text
Give this a try:

sActs4 = sActs4 & "Part 6 of the" & vbcrlf & "(excluding section 100 & 101)"
& vbCrLf

hth,

--
Cheryl Fischer
Law/Sys Associates
Houston, TX


Quote:
> I have this piece of code that places the text
> "Part 6 of the (excluding section 100 & 101)" on a report
> Does anyone know how i can get a carriage return in after
> "Part 6 of the" so the rest of the text goes to a new line?

> The relevant code is

> Private Sub Detail_Print(Cancel As Integer, PrintCount As
> Integer)
> Dim sActs4 As String

> If chkGas.Value = 2 Then
>         sActs4 = sActs4 & "Part 6 of the (excluding
> section 100 & 101)" & vbCrLf
>     End If
> LblActs4.Caption = sActs4
> End Sub



Tue, 23 Aug 2005 09:14:01 GMT  
 Put a carriage return in text
From Private email:

Thanks Cheryl - It worked a treat

I don't suppose you know how to make the ampersand in "(excluding section
100 & 101)" visible?

Thanks again
Chris

Hi Chris,

Sorry I missed that last line where you stored your string to a Label
caption.  If you're going to do that, you need to double up on the
Ampersands to force their display:

"(excluding section 100 && 101)"

Thanks!

--
Cheryl Fischer
Law/Sys Associates
Houston, TX


Quote:
> I have this piece of code that places the text
> "Part 6 of the (excluding section 100 & 101)" on a report
> Does anyone know how i can get a carriage return in after
> "Part 6 of the" so the rest of the text goes to a new line?

> The relevant code is

> Private Sub Detail_Print(Cancel As Integer, PrintCount As
> Integer)
> Dim sActs4 As String

> If chkGas.Value = 2 Then
>         sActs4 = sActs4 & "Part 6 of the (excluding
> section 100 & 101)" & vbCrLf
>     End If
> LblActs4.Caption = sActs4
> End Sub



Tue, 23 Aug 2005 09:47:50 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Putting a Carriage Return in to a rich text box

2. DBGrid....how to put a Memo field on a DbGRID (by using Carriage return)

3. Carriage Returns In Text Boxes

4. Deleting Last Carriage Return from Text File

5. HELP - representing carriage return for a text field?

6. Carriage Return in text box

7. carriage return in a text box?

8. Saving Text without Return Carriage

9. Carriage return in text box?

10. How to hide linefeed, and carriage return characters in text boxes

11. Inserting a carriage return in a text box

12. Inserting carriage return in TEXT string

 

 
Powered by phpBB® Forum Software