Inserting Carriage Return in Expressions?

  • Thread starter Thread starter gdai
  • Start date Start date
G

gdai

I am trying to find a way to insert a carriage return in a control on a
report. The control would contain an expression something like
=[AddressLine1] & CarriageReturn & [AddressLine2]. I'm looking for a way to
do this so that the second line won't cause the control to grow unless there
is actually a value in AddressLine2? Any input greatly appreciated.
Thanks...
Gary
 
I'm not entirely sure what you're asking, but if you check
the properties of the control there should be a
setting "Can Grow" (under Format). Try setting this
to "yes" and see if it helps.

Hope this helps -

Eliezer
 
Thanks, but the Can Grow function isn't exactly what I'm after. Basically,
I'm looking for a solution which will allow me to combine two fields in one
control with a forced carriage return between them. I can do something like
=[AddressLine1] & [AddressLine2] with CanGrow set to yes, but I have no
control over where the lines break. I could end up with something like this:

123 Main Street Suite
500

What I'm looking for is a way to make it always look like this:

1223 Main Street
Suite 500

Hope that explains it better.
Thanks...
Gary
 
Thanks, but the Can Grow function isn't exactly what I'm after. Basically,
I'm looking for a solution which will allow me to combine two fields in one
control with a forced carriage return between them. I can do something like
=[AddressLine1] & [AddressLine2] with CanGrow set to yes, but I have no
control over where the lines break. I could end up with something like this:

123 Main Street Suite
500

What I'm looking for is a way to make it always look like this:

1223 Main Street
Suite 500

Hope that explains it better.
Thanks...
Gary


I'm not entirely sure what you're asking, but if you check
the properties of the control there should be a
setting "Can Grow" (under Format). Try setting this
to "yes" and see if it helps.

Hope this helps -

Eliezer

like
I'm
looking for a way to
=[Address1] & chr(13) & chr(10) & [Address2]
 
Gary,

the following is the contents of an "address block" I use.

The "+" sign will only include the plussed character if
the field requested has data. The blank lines you would
otherwise get are effectively removed. In this example so
is the space character if there is no [title] or [first
name] field. The control can be sized to fit the maximum
number of lines or sized small with "can grow" enabled.

=[Title]+" " & [first name]+" " & [last name] & (Chr(13)
+Chr(10)+[address line 1]) & (Chr(13)+Chr(10)+[address
line 2]) & (Chr(13)+Chr(10)+[address line 3]) & (Chr(13)
+Chr(10) & [locality] & " " & [state] & " " & [postcode])

HTH,

Terry
-----Original Message-----
Thanks, but the Can Grow function isn't exactly what I'm after. Basically,
I'm looking for a solution which will allow me to combine two fields in one
control with a forced carriage return between them. I can do something like
=[AddressLine1] & [AddressLine2] with CanGrow set to yes, but I have no
control over where the lines break. I could end up with something like this:

123 Main Street Suite
500

What I'm looking for is a way to make it always look like this:

1223 Main Street
Suite 500

Hope that explains it better.
Thanks...
Gary


I'm not entirely sure what you're asking, but if you check
the properties of the control there should be a
setting "Can Grow" (under Format). Try setting this
to "yes" and see if it helps.

Hope this helps -

Eliezer

-----Original Message-----
I am trying to find a way to insert a carriage return in
a control on a
report. The control would contain an expression something
like
I'm
looking for a way to
do this so that the second line won't cause the control
to grow unless there
is actually a value in AddressLine2? Any input greatly
appreciated.
Thanks...
Gary


.
=[Address1] & chr(13) & chr(10) & [Address2]
--
Fred
Please respond only to this newsgroup.
I do not reply to personal email
.
 
Back
Top