469,317 Members | 1,989 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,317 developers. It's quick & easy.

Eliminating Blank Line in Address Section of Report

MX1
Hi,

I have a report with Name1 and Name2 in the address section . Sometimes,
Name2 is not populated with data via the query that feeds the report.
Unfortunately, the blank line stays in the report. I've tried experimenting
with the Can Shrink property to no avail. Any tips on eliminating blank
lines the right way would be much appreciated.

thanks!
Nov 12 '05 #1
5 1660
On Fri, 09 Jan 2004 17:26:41 GMT, "MX1" <mx*@mx1.abc> wrote:
Hi,

I have a report with Name1 and Name2 in the address section . Sometimes,
Name2 is not populated with data via the query that feeds the report.
Unfortunately, the blank line stays in the report. I've tried experimenting
with the Can Shrink property to no avail. Any tips on eliminating blank
lines the right way would be much appreciated.

thanks!


CanShrink is the right way to do it, but you have to make sure of the
following.

1. There are no other controls overlapping that control's vertical extent.
2. The section and the control both need CanShring set to Yes.
Nov 12 '05 #2
Yes. The code goes in the "Control Source" property.
You also need to start with an "="
Fred
"MX1" <mx*@mx1.abc> wrote in message news:W_CLb.7263$na.5576@attbi_s04...
This is cool code. I'm not sure how to implement it though. Where does it go? In the property of the control. I tried the can grow/can shrink
suggested by Steve but is absolutely not working. I can't believe how
complex this is turning out to be. "Fred Zuckerman" <Zu********@sbcglobal.net> wrote in message
news:PC****************@newssvr25.news.prodigy.com ...
"MX1" <mx*@mx1.abc> wrote in message

news:lvBLb.7953$xy6.19472@attbi_s02...
Hi,

I have a report with Name1 and Name2 in the address section . Sometimes, Name2 is not populated with data via the query that feeds the report.
Unfortunately, the blank line stays in the report. I've tried

experimenting
with the Can Shrink property to no avail. Any tips on eliminating blank lines the right way would be much appreciated.

thanks!

I haven't ever played with the "can grow/shrink" properties. But, I've

used
a less elegant solution...

[name1]
iif(len([name2])=0,[address],[name2])
iif(len([name2])=0,[city] & ", " & [state] & " " & [zip],[address])
iif(len([name2])=0,"",[city] & ", " & [state] & " " & [zip])

Less elegant, but effective for me.
Fred Zuckerman
San Diego, CA, USA


Nov 12 '05 #3
MX1
This is working somewhat, but I seem to have 2 cases that I need to
accomodate for: Null Values and Values that had data but the data has since
been deleted so its now an empty string. I don't think the Len check is
working for this. Any thoughts?
"Fred Zuckerman" <Zu********@sbcglobal.net> wrote in message
news:cL*****************@newssvr25.news.prodigy.co m...
Yes. The code goes in the "Control Source" property.
You also need to start with an "="
Fred
"MX1" <mx*@mx1.abc> wrote in message news:W_CLb.7263$na.5576@attbi_s04...
This is cool code. I'm not sure how to implement it though. Where does

it
go? In the property of the control. I tried the can grow/can shrink
suggested by Steve but is absolutely not working. I can't believe how
complex this is turning out to be.

"Fred Zuckerman" <Zu********@sbcglobal.net> wrote in message
news:PC****************@newssvr25.news.prodigy.com ...
"MX1" <mx*@mx1.abc> wrote in message

news:lvBLb.7953$xy6.19472@attbi_s02...
> Hi,
>
> I have a report with Name1 and Name2 in the address section . Sometimes, > Name2 is not populated with data via the query that feeds the report. > Unfortunately, the blank line stays in the report. I've tried
experimenting
> with the Can Shrink property to no avail. Any tips on eliminating blank > lines the right way would be much appreciated.
>
> thanks!
>
I haven't ever played with the "can grow/shrink" properties. But, I've

used
a less elegant solution...

[name1]
iif(len([name2])=0,[address],[name2])
iif(len([name2])=0,[city] & ", " & [state] & " " & [zip],[address])
iif(len([name2])=0,"",[city] & ", " & [state] & " " & [zip])

Less elegant, but effective for me.
Fred Zuckerman
San Diego, CA, USA



Nov 12 '05 #4
The method I proposed was pedicated on [name2] would be the only blank
field.
I should have stated that assumption.

With more than one possibly blank field, then your iif() statements would
have to grow to accomodate ALL of the various combinations of possibly blank
fields. This would result in a large "Rube Goldberg" code block.

I think the solution proposed by Larry Linson in another post of your same
question will be a "cleaner" method.
His solution was to add the fields to vbCrLf and let Access take care of it.
(anything + null = null)

Good Luck
Fred

"MX1" <mx*@mx1.abc> wrote in message news:feHLb.9384$nt4.15963@attbi_s51...
This is working somewhat, but I seem to have 2 cases that I need to
accomodate for: Null Values and Values that had data but the data has since been deleted so its now an empty string. I don't think the Len check is
working for this. Any thoughts?
"Fred Zuckerman" <Zu********@sbcglobal.net> wrote in message
news:cL*****************@newssvr25.news.prodigy.co m...
Yes. The code goes in the "Control Source" property.
You also need to start with an "="
Fred
"MX1" <mx*@mx1.abc> wrote in message news:W_CLb.7263$na.5576@attbi_s04... This is cool code. I'm not sure how to implement it though. Where does
it
go? In the property of the control. I tried the can grow/can shrink
suggested by Steve but is absolutely not working. I can't believe how
complex this is turning out to be.

"Fred Zuckerman" <Zu********@sbcglobal.net> wrote in message
news:PC****************@newssvr25.news.prodigy.com ...
> "MX1" <mx*@mx1.abc> wrote in message
news:lvBLb.7953$xy6.19472@attbi_s02...
> > Hi,
> >
> > I have a report with Name1 and Name2 in the address section .

Sometimes,
> > Name2 is not populated with data via the query that feeds the report. > > Unfortunately, the blank line stays in the report. I've tried
> experimenting
> > with the Can Shrink property to no avail. Any tips on eliminating

blank
> > lines the right way would be much appreciated.
> >
> > thanks!
> >
>
>
> I haven't ever played with the "can grow/shrink" properties. But,

I've used
> a less elegant solution...
>
> [name1]
> iif(len([name2])=0,[address],[name2])
> iif(len([name2])=0,[city] & ", " & [state] & " " & [zip],[address])
> iif(len([name2])=0,"",[city] & ", " & [state] & " " & [zip])
>
> Less elegant, but effective for me.
> Fred Zuckerman
> San Diego, CA, USA
>
>



Nov 12 '05 #5
MX1
Thanks for your feedback Fred. :)

"Fred Zuckerman" <Zu********@sbcglobal.net> wrote in message
news:FD****************@newssvr29.news.prodigy.com ...
The method I proposed was pedicated on [name2] would be the only blank
field.
I should have stated that assumption.

With more than one possibly blank field, then your iif() statements would
have to grow to accomodate ALL of the various combinations of possibly blank fields. This would result in a large "Rube Goldberg" code block.

I think the solution proposed by Larry Linson in another post of your same
question will be a "cleaner" method.
His solution was to add the fields to vbCrLf and let Access take care of it. (anything + null = null)

Good Luck
Fred

"MX1" <mx*@mx1.abc> wrote in message

news:feHLb.9384$nt4.15963@attbi_s51...
This is working somewhat, but I seem to have 2 cases that I need to
accomodate for: Null Values and Values that had data but the data has

since
been deleted so its now an empty string. I don't think the Len check is
working for this. Any thoughts?
"Fred Zuckerman" <Zu********@sbcglobal.net> wrote in message
news:cL*****************@newssvr25.news.prodigy.co m...
Yes. The code goes in the "Control Source" property.
You also need to start with an "="
Fred

>"MX1" <mx*@mx1.abc> wrote in message news:W_CLb.7263$na.5576@attbi_s04... > This is cool code. I'm not sure how to implement it though. Where does it
> go? In the property of the control. I tried the can grow/can shrink > suggested by Steve but is absolutely not working. I can't believe how > complex this is turning out to be.

> "Fred Zuckerman" <Zu********@sbcglobal.net> wrote in message
> news:PC****************@newssvr25.news.prodigy.com ...
> > "MX1" <mx*@mx1.abc> wrote in message
> news:lvBLb.7953$xy6.19472@attbi_s02...
> > > Hi,
> > >
> > > I have a report with Name1 and Name2 in the address section .
Sometimes,
> > > Name2 is not populated with data via the query that feeds the

report.
> > > Unfortunately, the blank line stays in the report. I've tried
> > experimenting
> > > with the Can Shrink property to no avail. Any tips on eliminating blank
> > > lines the right way would be much appreciated.
> > >
> > > thanks!
> > >
> >
> >
> > I haven't ever played with the "can grow/shrink" properties. But, I've > used
> > a less elegant solution...
> >
> > [name1]
> > iif(len([name2])=0,[address],[name2])
> > iif(len([name2])=0,[city] & ", " & [state] & " " & [zip],[address]) > > iif(len([name2])=0,"",[city] & ", " & [state] & " " & [zip])
> >
> > Less elegant, but effective for me.
> > Fred Zuckerman
> > San Diego, CA, USA
> >
> >
>
>



Nov 12 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Melissa | last post: by
1 post views Thread by DAnne | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.