if then statements

D

deba

I'm trying to put in an if/then statement for the C/O line of my address
datebase because not all the records have a C/O. This is what I'm entering
in the control source:

=IIf(IsNull([C/O])," ", [C/O])

It still leaves a blank line when I go to print the labels. What am I doing
wrong?
 
D

Duane Hookom

It seems to me that you are ensuring that the control will always take up
space. What happens if you leave the control source as:
[C/O]
and set the control to Can Shrink: Yes?
 
D

deba

Then I get labels that look like this:

John Doe

123 ABC St.
Everywhere, AB 00000

I also do have the control to can shrink set to yes.

Thanks for your help!

Duane Hookom said:
It seems to me that you are ensuring that the control will always take up
space. What happens if you leave the control source as:
[C/O]
and set the control to Can Shrink: Yes?

--
Duane Hookom
MS Access MVP
--

deba said:
I'm trying to put in an if/then statement for the C/O line of my address
datebase because not all the records have a C/O. This is what I'm
entering
in the control source:

=IIf(IsNull([C/O])," ", [C/O])

It still leaves a blank line when I go to print the labels. What am I
doing
wrong?
 
D

Duane Hookom

What is the exact control source of the text box that is set to Can Shrink?
Is it possible the value of the field is either a space or
zero-length-string?

--
Duane Hookom
MS Access MVP
--

deba said:
Then I get labels that look like this:

John Doe

123 ABC St.
Everywhere, AB 00000

I also do have the control to can shrink set to yes.

Thanks for your help!

Duane Hookom said:
It seems to me that you are ensuring that the control will always take up
space. What happens if you leave the control source as:
[C/O]
and set the control to Can Shrink: Yes?

--
Duane Hookom
MS Access MVP
--

deba said:
I'm trying to put in an if/then statement for the C/O line of my
address
datebase because not all the records have a C/O. This is what I'm
entering
in the control source:

=IIf(IsNull([C/O])," ", [C/O])

It still leaves a blank line when I go to print the labels. What am I
doing
wrong?
 
K

KARL DEWEY

You are telling to have a blank by using " " in your syntax. Omit the space
between quotation marks.
 
T

tina

I also do have the control to can shrink set to yes.

try also setting the report's Detail section's CanShrink property to Yes.

hth
 

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