View Full Version : Blank Lines


Goddoctor
07-01-2001, 10:18 PM
I'm having some trouble with extra blank lines in Access97 Report. Allow me to illustrate:

Labelbox1:
Labelbox2:Textbox2
Labelbox3:Textbox3

When I have Null data in the textboxes, I use in the Format section:

If (IsNull(Me.Textbox2)) Then
Me.Labelbox2.Visible=False
Else
Me.Labelbox2.Visible=True
End If
If (IsNull(Me.Textbox3)) Then
Me.Labelbox3.Visible=False
Else
Me.Labelbox3.Visible=True
End If
If (IsNull(Me.Textbox2)) And (IsNull(Me.Textbox3)) Then
Me.Label1.Visible=False
Else
Me.Lable1.Visible=True
End If

In that section of the report, if everything is null it wipes the slate clean, which is exactly what I want. The first two If Then statements are working perfectly. However, in the last If Then statement, when the report is viewed, there is a blank line on the report. How do I get rid of that? P.S. Making Labelbox1: a Textbox is not an acceptable solution to this particular problem.

mpc08
07-01-2001, 10:58 PM
Two thoughts neither of which I have tested.
First Check the "Can Shrink" property.
Second Change the label height to be smaller.
Not sure if either satisfy.
HTH

Pat Hartman
07-02-2001, 05:44 AM
Another possibility is that some control overlaps another. Access won't shrink if there is any control overlap.

Goddoctor
07-04-2001, 09:11 AM
Sorry guys. Had already checked all of that. Its still leaving Blank lines. Any other suggestions. Thanks. Doc.

pcs
07-04-2001, 10:25 AM
probably just a typo, but in your post you refer to "Labelbox1" then in your code
you reference Me.Label1.Visible=False.

what and where is Me.Lable1?

al

Goddoctor
07-04-2001, 12:40 PM
Correct pcs. Sorry about that. I have been using the dropdown menu to construct them so there are no typos in the code. Nice thought though.

Doc

pcs
07-04-2001, 02:35 PM
odd indeed...

if you change:
Labelbox1:
Labelbox2:Textbox2
Labelbox3:Textbox3

-to-
Labelbox1:Labelbox2:Textbox2 Labelbox3:Textbox3

(all on one line, it works...)

it would appear that access cannot 'recover' the white space if there is only a label on the line.

could you perhaps place a 'dummy' textbox beside labelbox1. think that might work...

hth,
al



[This message has been edited by pcs (edited 07-04-2001).]

Goddoctor
07-06-2001, 01:35 PM
Thanks pcs. Your suggestion worked like a charm. I simply added the labels with their respective textbox in Table and then didn't give them a place to put in data in Form and used IsNull in Report (since they would be) to get rid of Those lines. Thanks again.

pcs
07-06-2001, 07:50 PM
glad it worked!

thank you for posting the question...it caused me to re-think problems i have had in the past!
that is what is so great about this board. access has lots of strange hiccups. answering a question or asking a question helps us all in many ways http://www.access-programmers.co.uk/ubb/smile.gif

al