View Full Version : How to force carriage return between strings?


divardo
05-21-2009, 07:58 AM
Hi,

I am outputting a field in an access report in a vertical format. I would like it to go across the screen from left to right but all alone the same horizontal line. I know this could be done with forcing a carriage return after each string but I'm not sure how to go about this. Anybody have any ideas? Thanks.

Scooterbug
05-21-2009, 08:35 AM
Adding a chr(10) will do the trick

SOS
05-21-2009, 11:29 AM
Adding a chr(10) will do the trick
Actually, technically you should add a Chr(13) & Chr(10) to it.

13 is the Carriage Return
10 is the line feed

MSAccessRookie
05-21-2009, 11:31 AM
Actually, technically you should add a Chr(13) & Chr(10) to it.

13 is the Carriage Return
10 is the line feed

Don't forget vbCrLf if you are using VB as the method.

SOS
05-21-2009, 12:10 PM
Don't forget vbCrLf if you are using VB as the method.
Yes, you can use vbCrLf which is a constant that is basically the same as having the Chr(13) & Chr(10). So, in code I will use the constant name and in queries or control sources you have to use the CHR method.