Blank Lines

Goddoctor

New member
Local time
Today, 15:54
Joined
Jul 1, 2001
Messages
8
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.
 
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
 
Sorry guys. Had already checked all of that. Its still leaving Blank lines. Any other suggestions. Thanks. Doc.
 
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
 
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
 
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).]
 
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.
 
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
smile.gif


al
 

Users who are viewing this thread

Back
Top Bottom