Linefeed when concatenating strings

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

Guest

I'm trying to create a field in an address book that has the entire address ready formatted for cutting & pasting into another application for printing out a label

Therefore I need to concatenate the contents of several fields in my form design. No problem except that I also need to insert linefeeds at the end of each line of the address

If it possible to achieve this using an expression

Replies to my e-mail address would be wonderful: (e-mail address removed)

Thanks a bunch!
 
In a query, you need to use functions, not constants to perform a line feed,
so use something like:

Expr1: [Line1] & Chr(13) & Chr(10) & [Line2] & Chr(13) & Chr(10) & [Line3]
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

Toby said:
I'm trying to create a field in an address book that has the entire
address ready formatted for cutting & pasting into another application for
printing out a label.
Therefore I need to concatenate the contents of several fields in my form
design. No problem except that I also need to insert linefeeds at the end of
each line of the address.
 
I got this from a previous post

If you are working in VB code, use the vbCRLF (carriage
return, line feed).
If you are working in a query, you might need to use
Chr(10) & Chr(13) (I
think I got those pesky ASCIIs correct...<g>)

Jim
-----Original Message-----
I'm trying to create a field in an address book that has
the entire address ready formatted for cutting & pasting
into another application for printing out a label.
Therefore I need to concatenate the contents of several
fields in my form design. No problem except that I also
need to insert linefeeds at the end of each line of the
address.
 
If you are working in a query, you might need to use
Chr(10) & Chr(13) (I
think I got those pesky ASCIIs correct...<g>)

Pesky indeed! They're correct but in the wrong order - it needs to be
Chr(13) & Chr(10).
 
Back
Top