Why is my carriage return showing up as a box?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a label in a report that I want to change based on a variable.
Here's my code:

If Report.OpenArgs = "Text1" Then
lblVariable.Caption = "Text" & Chr(13) & "MoreText"
Else
lblVariable.Caption = "Text" & Chr(13) & "DifferentText"
End If

What am I doing wrong? I also tried this with a text box and a line feed
chr(10), but it seems to be treating my chr()'s like unprintable characters.
 
= "This is line 1." & chr(13) & chr(10) & "This is line 2."

= "This is line 1." & vbcrlf & "This is line 2."
 
Holly said:
I have a label in a report that I want to change based on a variable.
Here's my code:

If Report.OpenArgs = "Text1" Then
lblVariable.Caption = "Text" & Chr(13) & "MoreText"
Else
lblVariable.Caption = "Text" & Chr(13) & "DifferentText"
End If

What am I doing wrong? I also tried this with a text box and a line
feed chr(10), but it seems to be treating my chr()'s like unprintable
characters.

You need BOTH Chr(13) & Chr(10) in that order.
 
Back
Top