deleting spaces

A

Anna

Yesterday I asked a question about deleting spaces in a
report when the field is null, rather than just leaving a
blank space. I received the following response:

Borrowing a recent response by Access MVP Larry Linson on
this subject, here
are a couple of other things to check:

(1) If there are other Controls in the same line as the
one with Can Shrink,
it will not shrink. It must "shrink" all the way across
the report page,

(2) A Control that is touching another Control may not
Shrink as you would
expect, and

(3) sometimes the CanShrink property of the Section was
not set
by default and must be set manually.


Based on this I have another question. The lines of my
report that I want to be deleted have both a label and
then a text box next to it where the value in the field
would appear. Does this constitute another control in
same line so neither will shrink as I want them to?? I
have both set to CanShrink. If anyone could help me I
would really appreciate it, Thanks!
 
M

Marshall Barton

Anna said:
The lines of my
report that I want to be deleted have both a label and
then a text box next to it where the value in the field
would appear. Does this constitute another control in
same line so neither will shrink as I want them to?? I
have both set to CanShrink.

Yes, a label will prevent the section from shrinking.

There are a couple of ways to deal with this situation. One
is to change the label to a text box with an expression
along these lines:
=IIf(IsNull(thedatatextbox),Null,"thelabelcaption")
This will allow both textboxes to shrink when the data text
box's bound field id Null.

A different approach is to leave the label control as is and
use a little code in the text box section's Format event:
Me.thedatatextbox.Visible = Not IsNull(Me.thedatatextbox)
which will make the text box and its attached label
invisible so they both shrink.
 
A

Anna

I have already done your 1st approach, but a blank line is
still left in my report rather than having the text below
carried up.
 
M

Marshall Barton

Anna said:
I have already done your 1st approach, but a blank line is
still left in my report rather than having the text below
carried up.

Are you sure that you set CanShrink to Yes for both text
boxes and their section as well?

Are there any other controls in the same horizontal area as
the text boxes?

Is there any chance that there might be controls above or
below the text boxes that overlap the text boxes, even by
the tiniest amount?
 
G

Guest

CanShrink is set to yes for both text boxes and the
section. There are no other controls in the horizontal
area. There is significant space above and below the text
boxes so I am sure there is no overlapping. Could it be
something else?
-----Original Message-----
Anna said:
I have already done your 1st approach, but a blank line is
still left in my report rather than having the text below
carried up.

Are you sure that you set CanShrink to Yes for both text
boxes and their section as well?

Are there any other controls in the same horizontal area as
the text boxes?

Is there any chance that there might be controls above or
below the text boxes that overlap the text boxes, even by
the tiniest amount?
--
Marsh
MVP [MS Access]


situation.
One is
and

.
 
M

Marshall Barton

CanShrink is set to yes for both text boxes and the
section. There are no other controls in the horizontal
area. There is significant space above and below the text
boxes so I am sure there is no overlapping. Could it be
something else?

I'm stumped, unless the two text boxes are themselves
overlapping.

Grasping at straws now, but maybe there is another control
that you can't see. A line control? A label that's
positioned behind one of the text boxes? Try clicking in
the section and then tabbing to each control and check for
any surprises???
--
Marsh
MVP [MS Access]


-----Original Message-----
Anna said:
I have already done your 1st approach, but a blank line is
still left in my report rather than having the text below
carried up.

Are you sure that you set CanShrink to Yes for both text
boxes and their section as well?

Are there any other controls in the same horizontal area as
the text boxes?

Is there any chance that there might be controls above or
below the text boxes that overlap the text boxes, even by
the tiniest amount?
--
Marsh
MVP [MS Access]


-----Original Message-----
Anna wrote:

The lines of my
report that I want to be deleted have both a label and
then a text box next to it where the value in the field
would appear. Does this constitute another control in
same line so neither will shrink as I want them to?? I
have both set to CanShrink.

Yes, a label will prevent the section from shrinking.

Marshall Barton wrote:
There are a couple of ways to deal with this situation.
One
is to change the label to a text box with an expression
along these lines:
=IIf(IsNull(thedatatextbox),Null,"thelabelcaption")
This will allow both textboxes to shrink when the data
text
box's bound field id Null.

A different approach is to leave the label control as is
and
use a little code in the text box section's Format event:
Me.thedatatextbox.Visible = Not IsNull
(Me.thedatatextbox)
which will make the text box and its attached label
invisible so they both shrink.

.
 
D

Denise

I have the same situation that I have been trying to
figure out for weeks. If you come up with anything,
please post it.

Thank you.
-----Original Message-----
CanShrink is set to yes for both text boxes and the
section. There are no other controls in the horizontal
area. There is significant space above and below the text
boxes so I am sure there is no overlapping. Could it be
something else?

I'm stumped, unless the two text boxes are themselves
overlapping.

Grasping at straws now, but maybe there is another control
that you can't see. A line control? A label that's
positioned behind one of the text boxes? Try clicking in
the section and then tabbing to each control and check for
any surprises???
--
Marsh
MVP [MS Access]


-----Original Message-----
Anna wrote:

I have already done your 1st approach, but a blank
line
is
still left in my report rather than having the text below
carried up.

Are you sure that you set CanShrink to Yes for both text
boxes and their section as well?

Are there any other controls in the same horizontal
area
as
the text boxes?

Is there any chance that there might be controls above or
below the text boxes that overlap the text boxes, even by
the tiniest amount?
--
Marsh
MVP [MS Access]



-----Original Message-----
Anna wrote:

The lines of my
report that I want to be deleted have both a label and
then a text box next to it where the value in the field
would appear. Does this constitute another control in
same line so neither will shrink as I want them
to??
I
have both set to CanShrink.

Yes, a label will prevent the section from shrinking.

Marshall Barton wrote:
There are a couple of ways to deal with this situation.
One
is to change the label to a text box with an expression
along these lines:
=IIf(IsNull(thedatatextbox),Null,"thelabelcaption")
This will allow both textboxes to shrink when the data
text
box's bound field id Null.

A different approach is to leave the label control as is
and
use a little code in the text box section's Format event:
Me.thedatatextbox.Visible = Not IsNull
(Me.thedatatextbox)
which will make the text box and its attached label
invisible so they both shrink.

.

.
 

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