Hiding Group Footers & Headers

  • Thread starter Thread starter damjanu
  • Start date Start date
D

damjanu

Hi all

-------------------------------------
This would seem like a problem many people would have, but I couldnt
find any posts that suggested a solution to it.
-------------------------------------

I've managed to create this amazing report that depending on
number of values (if > 1) prints or doesnt print the footer. I use
the Me.PrintSection = False, and nothing is printed. Still space that
this group footer would take up if it were printed is still being taken up.

I would like to get rid of it, as if there was no footer at all.

Does anyone know how to do this?

Help is appriciated a lot,

Cheers
Damjan

ps I tried few properties, but nothing worked...
 
have you tried setting the CanShrink property of the
section, and all controls in it, to Yes? (the CanGrow
property is normally Yes by default.) keep in mind that
any vertical spacing between controls in the section will
be retained if the section shrinks.

will you post back to let me know if this works?
 
I've managed to create this amazing report that depending on
number of values (if > 1) prints or doesnt print the footer. I use
the Me.PrintSection = False, and nothing is printed. Still space that
this group footer would take up if it were printed is still being taken up.

I would like to get rid of it, as if there was no footer at all.

If you're using PrintSection = False, then you need to also
use MoveLayout = False.

Other ways are to use either:
Me.Section(N).Visible = (txtCountValues > 1)
or
Cancel = (txtCountValues > 1)
where txtCountValues is the name of your running sum line
counter text box.
 
Thanks a lot all,
for the problem I described
I used
If (myCounterField < 1) Then
Me.PrintSection = False
Cancel = True
End If
in myGroupHeader_Format event.

So Cancel = True did it for me,

I really cannot say what it does. I know it
exists in almost all events. Perhaps
cancels the existance of current object: in
this case GroupHeader.

Damjan
 
Thanks a lot all,
for the problem I described
I used
If (myCounterField < 1) Then
Me.PrintSection = False
Cancel = True
End If
in myGroupHeader_Format event.

You do not need to use PrintSection if you're using Cancel

So Cancel = True did it for me,

I really cannot say what it does. I know it
exists in almost all events. Perhaps
cancels the existance of current object: in
this case GroupHeader.

It signals that this instance of the section was canceled so
it will not appear in the report.
 
Ok I admit,
you are a genious and I am just a
fake trying to patch something up in access:)

Thanks again
Damjan
 
Back
Top