Avoid printing spaces

  • Thread starter Thread starter prothery
  • Start date Start date
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
 
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
 
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
'====================================================
 
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
 
Back
Top