Eliminate blank lines

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
 
G

Guest

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

Guest

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
 
G

Guest

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
 
J

John Spencer (MVP)

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
 
G

Guest

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
 
G

Guest

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
 
J

John Spencer (MVP)

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
 

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

Similar Threads


Top