How to Suppress a Line in a Detail Band

  • Thread starter Thread starter Mike Thomas
  • Start date Start date
M

Mike Thomas

In Access 2000, I have a report in which the detail band has 2 rows.

Each text box in the first row is always printed.
The second row has one text box. It is printed or not based on the data in
one of the textboxes in the first row.

If the textbox in the second row is not printed, how can I prevent the line
from being inserted? Inother words, is there a way to avoid having a blank
line in the detail band when the when the textbox in the second row is not
printed?

Many thanks
Mike Thomas
 
Change the ControlSource of the 2nd text box to an IIf() statement such as
this:
=IIf([Text1] = 1, [SomeField], Null)

Set this text box's CanShrink property to Yes.

Now the text box will be null and shrink to zero-height when the first text
box contains the value 1, provided there is nothing else on the line or
overlapping the text box that prevents it from shrinking.

Be sure to change the Name of the text box as well: Access gets confused if
the Name is the same as a field name but it text box is bound to something
else.
 
Many thanks again, Allan.

Mike Thomas

Allen Browne said:
Change the ControlSource of the 2nd text box to an IIf() statement such as
this:
=IIf([Text1] = 1, [SomeField], Null)

Set this text box's CanShrink property to Yes.

Now the text box will be null and shrink to zero-height when the first text
box contains the value 1, provided there is nothing else on the line or
overlapping the text box that prevents it from shrinking.

Be sure to change the Name of the text box as well: Access gets confused if
the Name is the same as a field name but it text box is bound to something
else.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Mike Thomas said:
In Access 2000, I have a report in which the detail band has 2 rows.

Each text box in the first row is always printed.
The second row has one text box. It is printed or not based on the data in
one of the textboxes in the first row.

If the textbox in the second row is not printed, how can I prevent the line
from being inserted? Inother words, is there a way to avoid having a blank
line in the detail band when the when the textbox in the second row is not
printed?

Many thanks
Mike Thomas
 

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

Back
Top