Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / January 2005

Tip: Looking for answers? Try searching our database.

Eliminate blank lines

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ellen - 06 Jan 2005 19:07 GMT
Hello,
I've made a phone directory for my church.  After the first and last name
appears, I'd like the spouse's name to appear if there is one.  I've written
an if then statement as such:

=IIf(Len([Spouse First Name] & "")=0," ","Spouse: " & [Spouse First Name] &
" " & [Spouse Last Name])

and have set every detail "can shrink" setting to "yes" that I can find.  
But there is still a blank line under the name of all where the spouse entry
is blank.  --The if then statement works BTW.

Is there a way for me to eliminate the blank lines?

Thanks in advance,
Ellen
Fons Ponsioen - 06 Jan 2005 19:44 GMT
Ellen, you also should set the can shrink for the band to yes.
Hope this helps.
Fons

> Hello,
> I've made a phone directory for my church.  After the first and last name
[quoted text clipped - 12 lines]
> Thanks in advance,
> Ellen
Ellen - 06 Jan 2005 20:21 GMT
Thanks for replying to my question.  What is the band?

> Ellen, you also should set the can shrink for the band to yes.
> Hope this helps.
[quoted text clipped - 16 lines]
> > Thanks in advance,
> > Ellen
Fons Ponsioen - 06 Jan 2005 22:22 GMT
Ellen.
The bands that I am refering to you see when you have your report open in
design view.  You'll usually see The report header band, than a page header,
any applicable Group header bands and than a detail band.  Each one of these
bands has its own properties that can be set.  To see the properties window
just dbl click on the narrow gray band.
Hope this helps, and answers your question.
Fons

> Thanks for replying to my question.  What is the band?
>
[quoted text clipped - 18 lines]
> > > Thanks in advance,
> > > Ellen
John Spencer (MVP) - 06 Jan 2005 22:49 GMT
Excuse me, you might also change the IIF statement slightly. Either set it to a
zero-length string "" vice " " or to NULL if the length of Spouse First Name is
zero.  I think can shrink only works with null or zero-length strings to
completely shrink the control.

> Ellen.
> The bands that I am refering to you see when you have your report open in
[quoted text clipped - 27 lines]
> > > > Thanks in advance,
> > > > Ellen
Ellen - 07 Jan 2005 17:52 GMT
John,
You're beautiful!!!

My IIF statement now is:

=IIf(Len([Spouse First Name] & "")=0,Null,"Spouse:  " & [Spouse First Name]
& " " & [Spouse Last Name])

When I set the "can shrink" to yes and it disappears when the spouse field
is empty.

What did you mean when you said "set it to a zero-length string "" vice " ""?

Bye!
Ellen

> Excuse me, you might also change the IIF statement slightly. Either set it to a
> zero-length string "" vice " " or to NULL if the length of Spouse First Name is
[quoted text clipped - 32 lines]
> > > > > Thanks in advance,
> > > > > Ellen
Ellen - 07 Jan 2005 18:01 GMT
Hi John,
=IIf(Len([Spouse First Name] & "")=0,"","Spouse:  " & [Spouse First Name] &
" " & [Spouse Last Name]) also works.  Is this what you meant when you said
to set to a zero-length string?

Ellen

> Excuse me, you might also change the IIF statement slightly. Either set it to a
> zero-length string "" vice " " or to NULL if the length of Spouse First Name is
[quoted text clipped - 32 lines]
> > > > > Thanks in advance,
> > > > > Ellen
John Spencer (MVP) - 07 Jan 2005 23:05 GMT
Yes, a string of " " has one character in it (The space character).  The string
"" has no characters between the quotes and is therefore a ZERO length string.

> Hi John,
> =IIf(Len([Spouse First Name] & "")=0,"","Spouse:  " & [Spouse First Name] &
[quoted text clipped - 39 lines]
> > > > > > Thanks in advance,
> > > > > > Ellen
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.