Adding carriage returns to textboxes in a report (A2000)

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

I have a report that has a text box with this control
source:
=IIf([GrillsYesNo]="Yes",[cwGrillStyle] & [cwGrillBars] &
[cwGrillColor],"None")
This text box's Can Grow = True.
What I would like to do is add a carriage return between
cwGrillStyle and cwGrillBars, and between cwGrillBars and
cwGrillColor. I don't want to use separate textboxes for
each field, because if there are no Grills (GrillsYesNo
= "No", then I don't want the extra blank rows. I have
tried using vbCrLf, but Access assumes that this is a
field name, and I tried chr(13), and it just gives me a
small square inbetween my fields. Any ideas would be
greatly appreciated.


---Mark
 
Mark said:
I have a report that has a text box with this control
source:
=IIf([GrillsYesNo]="Yes",[cwGrillStyle] & [cwGrillBars] &
[cwGrillColor],"None")
This text box's Can Grow = True.
What I would like to do is add a carriage return between
cwGrillStyle and cwGrillBars, and between cwGrillBars and
cwGrillColor. I don't want to use separate textboxes for
each field, because if there are no Grills (GrillsYesNo
= "No", then I don't want the extra blank rows. I have
tried using vbCrLf, but Access assumes that this is a
field name, and I tried chr(13), and it just gives me a
small square inbetween my fields. Any ideas would be
greatly appreciated.

You need both Chr(13) & Chr(10)
(in that order)
 
Thanks a lot, Rick. That worked great.

Just for curiousity's sake, why do i need both chr(13) and
chr(10) to get a carriage return?
 
Mark said:
Thanks a lot, Rick. That worked great.

Just for curiousity's sake, why do i need both chr(13) and
chr(10) to get a carriage return?

Most windows files need both a Carriage Return (13) and a LineFeed (10) to
start a new line. Other systems only use one or the other usually (10).
 
Thanks for the info. I didn't realize that (13) was
Carriage return and (10) was line feed. I had always
assumed that they were interchangeable. Thanks again.


--Mark

Original Message:
 
Back
Top