Avoid printing spaces

P

prothery

I have a report which performs a calculation in a group footer and selects
(using IIF) values above a threshold. Only 4 values exceed the threshold out
of several hundred results. So i get 20 pages and only 4 lines with values in
them. How do I get rid of all the spaces?

Any help gratefully received

Pete
 
J

June7 via AccessMonster.com

Four lines of data on each of 20 pages? You have setting for new page after
each group, change this. Are you in Access2007?
 
P

prothery

No I have 4 lines of data spread over 20 pages - not per page. This is
because only a few of the groups come above the threashold. I am on
Access2003. But thanks anyway

Pete
 
J

John Spencer

IF the calculation returns NULL when the value is below the threshhold
then you should be able to set the control's and section's can shrink
property to Yes. You would probably want to include the label's caption
in the control's source and delete the label.

Something like:
=IIF([A]>20,"OVER THE LIMIT: " & [A],Null)

If you need further help, you need to post more information. Such as
what is in the group footer and what your calculation is. You might
need to use the footer's format event and some VBA to cancel the
section. For example, if your section should only print when the value
of the control is 200 or greater then the code might look like:

Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)
Cancel = (Me.txtCalculatedField < 200)
End Sub


'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
P

prothery

Thanks a lot I can make the calcutation return NULL so your solution should
be fine.
So thanks again John Spencer

Pete


John Spencer said:
IF the calculation returns NULL when the value is below the threshhold
then you should be able to set the control's and section's can shrink
property to Yes. You would probably want to include the label's caption
in the control's source and delete the label.

Something like:
=IIF([A]>20,"OVER THE LIMIT: " & [A],Null)

If you need further help, you need to post more information. Such as
what is in the group footer and what your calculation is. You might
need to use the footer's format event and some VBA to cancel the
section. For example, if your section should only print when the value
of the control is 200 or greater then the code might look like:

Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)
Cancel = (Me.txtCalculatedField < 200)
End Sub


'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================

I have a report which performs a calculation in a group footer and selects
(using IIF) values above a threshold. Only 4 values exceed the threshold out
of several hundred results. So i get 20 pages and only 4 lines with values in
them. How do I get rid of all the spaces?

Any help gratefully received

Pete
 

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