Removing spaces when text-boxes are not visible

  • Thread starter Thread starter Raymond
  • Start date Start date
R

Raymond

Hi everyone.. I am having a report which has some text-boxes that are
displayed on some conditions. What I want is, when they are not to be
displayed(visible=no), they should not leave a blank space as they usually
do; and the fields following it should move one place up( i.e. eliminating
the space of text-boxes which are not displayed..)

Is this possible?

Thanks in advance,

Warm Regards,
Raymond
 
Hi Raymond

You can set all the text box in the report to
Can Grow = Yes
Can Shrink = Yes
 
That's not working actually... I cannot make it shrink although the property
"Can shrink"= Yes...
 
Sorry that was my mistake - I have just re-read your question.

You can set the Visible to No using a simple bit of code
Basically if textbox = xxx then visible = No like this in the OnFormat
section of the detail


Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.BoxName = "condition here" Then
Me.BoxName.Visible = False
End If
End Sub

You will need to put the same code in the OnPrint event
 
Raymond,

You need to make sure that the Can Shrink property of the Detail
section of the report (or whichever section the field is in) is set to
Yes. Also there must not be any fields on the same line horizontally
which do not shrink (obviously).

Peter Hibbs.
 
Back
Top