Eliminate blank lines

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

Guest

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
 
Thanks for replying to my question. What is the band?

Fons Ponsioen said:
Ellen, you also should set the can shrink for the band to yes.
Hope this helps.
Fons

Ellen said:
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
 
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

Ellen said:
Thanks for replying to my question. What is the band?

Fons Ponsioen said:
Ellen, you also should set the can shrink for the band to yes.
Hope this helps.
Fons

Ellen said:
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
 
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.

Fons said:
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

Ellen said:
Thanks for replying to my question. What is the band?

Fons Ponsioen said:
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
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
 
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

John Spencer (MVP) said:
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.

Fons said:
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

Ellen said:
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.
Fons

:

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
 
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

John Spencer (MVP) said:
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.

Fons said:
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

Ellen said:
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.
Fons

:

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
 
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] &
" " & [Spouse Last Name]) also works. Is this what you meant when you said
to set to a zero-length string?

Ellen

John Spencer (MVP) said:
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.

Fons said:
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?

:

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
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
 
Back
Top