Address fields

C

carlsadlier

Hello everyone,
I have a report with name, address1, address2, city,state and zip
fields among others. Sometimes there is data in the Address2 field and
sometimes there isn't. My Problem is I would like the city,state zip
field to move up to addres2 when addres2 is null. What is the best way
to do this?
Thanks.
 
M

Marshall Barton

I have a report with name, address1, address2, city,state and zip
fields among others. Sometimes there is data in the Address2 field and
sometimes there isn't. My Problem is I would like the city,state zip
field to move up to addres2 when addres2 is null. What is the best way
to do this?


Try setting CanShrink for both the address2 text box and its
section.

If your report has other controls that interfere with
CanShrink, then use a single text box for the entire address
using an expression like:

=name & Chr(13) & Chr(10) & address1 & Chr(13) & Chr(10) &
(address2 + Chr(13) + Chr(10)) & city & ", " & state & " "
& zip
 
C

carlsadlier

Try setting CanShrink for both the address2 text box and its
section.

If your report has other controls that interfere with
CanShrink, then use a single text box for the entire address
using an expression like:

=name & Chr(13) & Chr(10) & address1 & Chr(13) & Chr(10) &
(address2 + Chr(13) + Chr(10)) & city & ", " & state & " "
& zip

There seems to be a problem with the CR LF. The box will only show the
name and if I remove the CHR(13) & CHR(10) the address1 is displayed.
 
M

Marshall Barton

There seems to be a problem with the CR LF. The box will only show the
name and if I remove the CHR(13) & CHR(10) the address1 is displayed.


Maybe the text box is not tall enough? Try setting the text
box's CanGrow ro Yes.

Or, you could make the text box tall enough for 4 lines and
use CanShrink to deal with cases where there only 3 lines.
 
C

carlsadlier

There seems to be a problem with the CR LF. The box will only show the
name and if I remove the CHR(13) & CHR(10) the address1 is displayed.

Maybe the text box is not tall enough? Try setting the text
box's CanGrow ro Yes.

Or, you could make the text box tall enough for 4 lines and
use CanShrink to deal with cases where there only 3 lines.

--
Marsh
MVP [MS Access]- Hide quoted text -

- Show quoted text -

Thaks. That was it. I can't believe I didn't think of that!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top