How to make a '\n'

G

Grand Titus

I would like to make a control in a state with this expression:
=[field1] & "\n" & [field2]

But \n doesn't work. Access doesn't treat \n as an end line.

How can I make Access understand that it must break the line?

Thanks
 
J

Jeff Boyce

If you are asking how Access indicates a carriage return/line feed, it
depends on where you are trying to do this. In code, the system constant
"vbCRLF" does this. In other places, you can use "Chr(10) & Chr(13)"
(actual syntax may vary).
 
M

Mike Painter

Jeff said:
Van

(can you tell I haven't used it in a while... <g>?)

Jeff

I don't know if this was answered or where it would be used but Ctrl-<enter>
does this in almost all of Windows.
 
V

Van T. Dinh

13 is my lucky number so I know it has to come first.

That is probably why I don't get mixed up ...
 
V

Van T. Dinh

I think Grand Titus wanted to add this in the ControlSource of a Calculated
Control.

--
HTH
Van T. Dinh
MVP (Access)
 
Top