New Line in a Trim Statement

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

Guest

I'm using a Trim() statement to string together a number of fields into one
entry. Is there any way to force a new line within the Trim statement so the
entry would appear on more than one line on my report?

For instance, instead of:
Joe Smith, Mockingbird Lane, Detroit, MI

I would get:
Joe Smith
Mockingbird Lane
Detroit, MI

Thanks for your assistance.

Kevin D.
 
Kevin said:
I'm using a Trim() statement to string together a number of fields into one
entry. Is there any way to force a new line within the Trim statement so the
entry would appear on more than one line on my report?

For instance, instead of:
Joe Smith, Mockingbird Lane, Detroit, MI

I would get:
Joe Smith
Mockingbird Lane
Detroit, MI


Trim can't do that.

If that address were all in one value and if you can
guarantee the first two commas will always be there, you
could use:
Replace([yourfield], ",", Chr(13) & Chr(10), 1, 2)

OTOH, if you have 4 separate values, you could use something
like:
Fname & Chr(13) & Chr(10) & (Street + Chr(13) + Chr(10)) &
(City + ", ") & State
 
Back
Top