By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,635 Members | 911 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,635 IT Pros & Developers. It's quick & easy.

carriage return in an expression

P: n/a
Using Access 2000, I'm looking for a way to concatenate two fields in an
expression within a report. Basically, the two are an address field (memo
type) and postcode (text). I know about the expression itself and use the
syntax =[Address]&" "&[Postcode] but ofcourse, the postcode appears on the
same line as the last line of the address. What I really want to be able to
do is to have it on the next line. I could use a separate control, but if
the address is only 2 lines long, there is a gap. Any ideas gratefully
received.

Dave
Nov 13 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Dave wrote:
Using Access 2000, I'm looking for a way to concatenate two fields in
an expression within a report. Basically, the two are an address
field (memo type) and postcode (text). I know about the expression
itself and use the syntax =[Address]&" "&[Postcode] but ofcourse, the
postcode appears on the same line as the last line of the address.
What I really want to be able to do is to have it on the next line. I
could use a separate control, but if the address is only 2 lines
long, there is a gap. Any ideas gratefully received.

Dave


=[Address]& vbCrLf &[Postcode]
Nov 13 '05 #2

P: n/a
"Dave" <no****@yourbusiness.com> wrote in message news:<41***********************@ptn-nntp-reader01.plus.net>...
Using Access 2000, I'm looking for a way to concatenate two fields in an
expression within a report. Basically, the two are an address field (memo
type) and postcode (text). I know about the expression itself and use the
syntax =[Address]&" "&[Postcode] but ofcourse, the postcode appears on the
same line as the last line of the address. What I really want to be able to
do is to have it on the next line. I could use a separate control, but if
the address is only 2 lines long, there is a gap. Any ideas gratefully
received.

Dave


vbCrLf? or I think it's chr$(16) & chr$(34)
Nov 13 '05 #3

P: n/a
"Pieter Linden" <pi********@hotmail.com> wrote in message
news:bf**************************@posting.google.c om...
"Dave" <no****@yourbusiness.com> wrote in message

news:<41***********************@ptn-nntp-reader01.plus.net>...
Using Access 2000, I'm looking for a way to concatenate two fields in an
expression within a report. Basically, the two are an address field (memo type) and postcode (text). I know about the expression itself and use the syntax =[Address]&" "&[Postcode] but ofcourse, the postcode appears on the same line as the last line of the address. What I really want to be able to do is to have it on the next line. I could use a separate control, but if the address is only 2 lines long, there is a gap. Any ideas gratefully
received.

Dave


vbCrLf? or I think it's chr$(16) & chr$(34)


Chr(13) & Chr(10), and it must be in that order

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


Nov 13 '05 #4

P: n/a
Douglas J. Steele (NOSPAM_djsteele@NOSPAM_canada.com) wrote:
: "Pieter Linden" <pi********@hotmail.com> wrote in message
: news:bf**************************@posting.google.c om...
:> "Dave" <no****@yourbusiness.com> wrote in message
: news:<41***********************@ptn-nntp-reader01.plus.net>...
:> > Using Access 2000, I'm looking for a way to concatenate two fields
:> > in an expression within a report. Basically, the two are an
:> > address field (memo type) and postcode (text). I know about the
:> > expression itself and use the syntax =[Address]&" "&[Postcode] but
:> > ofcourse, the postcode appears on the same line as the last line
:> > of the address. What I really want to be able to do is to have it
:> > on the next line. I could use a separate control, but if the
:> > address is only 2 lines long, there is a gap. Any ideas gratefully
:> > received.
:> >
:> > Dave
:>
:> vbCrLf? or I think it's chr$(16) & chr$(34)
:
: Chr(13) & Chr(10), and it must be in that order

I use vbNewLine myself...
--
Please remove the under_scores if sending me mail.
Nov 13 '05 #5

P: n/a
"Roald Oines" wrote
: Chr(13) & Chr(10), and it must be in that order

I use vbNewLine myself...


Like vbCrLF (which gives the identical actual character codes), vbNewLine
can only be used in VBA code. If using an expression in a Control Source,
for example, you must use the Chr(13) & Chr(10) that the vbCrLf or vbNewLine
would generate in VBA code.

Larry Linson
Microsoft Access MVP
Nov 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.