Hiding Group Footers & Headers

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...
 
M

Marshall Barton

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.
 
D

damjanu

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
 
M

Marshall Barton

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.
 
D

damjanu

Ok I admit,
you are a genious and I am just a
fake trying to patch something up in access:)

Thanks again
Damjan
 

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

Top