CR/LF in Access Report?

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

Guest

Is it possible to force a carriage return / line feed in a text field in an
Access report? I've tried syntax like:

=[Field1] & chr(10) & [Field2]
=[Field1] & chr(13) & [Field2]
=[Field1] & chr(10) & chr(13) & [Field2]

But none of the above cause a CRLF between the two fields. Is it possible
to do this?
 
Chris B said:
Is it possible to force a carriage return / line feed in a text field in an
Access report? I've tried syntax like:

=[Field1] & chr(10) & [Field2]
=[Field1] & chr(13) & [Field2]
=[Field1] & chr(10) & chr(13) & [Field2]

But none of the above cause a CRLF between the two fields. Is it possible
to do this?

You tried all combinations but the correct one. You need both Chr(13) & Chr(10)
and in that order.
 
Chris said:
Is it possible to force a carriage return / line feed in a text field
in an Access report? I've tried syntax like:

=[Field1] & chr(10) & [Field2]
=[Field1] & chr(13) & [Field2]
=[Field1] & chr(10) & chr(13) & [Field2]

But none of the above cause a CRLF between the two fields. Is it
possible to do this?

=[Field1] & vbCRLF & [Field2]

see "visual basic constants" in VB help.
 
You can't use vba constants outside of modules.

--
Duane Hookom
MS Access MVP


Mike Painter said:
Chris said:
Is it possible to force a carriage return / line feed in a text field
in an Access report? I've tried syntax like:

=[Field1] & chr(10) & [Field2]
=[Field1] & chr(13) & [Field2]
=[Field1] & chr(10) & chr(13) & [Field2]

But none of the above cause a CRLF between the two fields. Is it
possible to do this?

=[Field1] & vbCRLF & [Field2]

see "visual basic constants" in VB help.
 
Duane said:
You can't use vba constants outside of modules.

Oops, That's what happens when I ask my dog to answer a question.
It's not all his fault, he's about 99% deaf.
 
A man and his dog walk into an Access users group meeting. They sit in the
back and every time someone says "report", the dog barks once...
 
Back
Top