Conditionally setting footer section height to 0

E

EVPLS

Hi,

my report (in Access 2000) is based on a table supplying

product class(0) / group / order ascending / keep together with first /
header + footer
product class(1) / group / order ascending / no keeping together / header,
no footer
product class(2) / group / order ascending / no keeping together / header,
no footer
trademark / group / order ascending / keep together with first / header +
footer
.... (additional fields, no grouping/sorting)

The three levels of grouping for "product class" are there to repeat certain
controls after a page break but not all (that is:
"product class(0)" contains the chapter's name, to be repeated;
"product class(1)" contains a memo field, not to be repeated;
"product class(2)" contains the column headers (labels) for the detail
section, to be repeated.

The "trademark" footer is set to 0.5 cm height because the "new line after"
instruction results in "irregular spacing" (sometimes it's really the one
line intended, too often it looks like 5 or 6 lines). The "product class(0)"
footer is set to "new page after".

How would I set a footer section's height to 0 if only that footer section
(and no record) would break to a new page which, if immediately followed by
the "product class(0)" footer's "new page after", in a blank page ?

I hope I got the terms right because I'm working with a German-language
version. Thanks a lot in advance.
 
M

Marshall Barton

EVPLS said:
my report (in Access 2000) is based on a table supplying

product class(0) / group / order ascending / keep together with first /
header + footer
product class(1) / group / order ascending / no keeping together / header,
no footer
product class(2) / group / order ascending / no keeping together / header,
no footer
trademark / group / order ascending / keep together with first / header +
footer
... (additional fields, no grouping/sorting)

The three levels of grouping for "product class" are there to repeat certain
controls after a page break but not all (that is:
"product class(0)" contains the chapter's name, to be repeated;
"product class(1)" contains a memo field, not to be repeated;
"product class(2)" contains the column headers (labels) for the detail
section, to be repeated.

The "trademark" footer is set to 0.5 cm height because the "new line after"
instruction results in "irregular spacing" (sometimes it's really the one
line intended, too often it looks like 5 or 6 lines). The "product class(0)"
footer is set to "new page after".

How would I set a footer section's height to 0 if only that footer section
(and no record) would break to a new page which, if immediately followed by
the "product class(0)" footer's "new page after", in a blank page ?


I think you are asking how to skip the class2 footer if it
is at the top of a page and the last group2 footer in a
class0 group.

If that's a correct summary of your question, then try this
kind of (somewhat convoluted) logic.

First, you need to figure out when you are in the format
event of the last group2 footer. The total number of
details in a group0 can be determined simply by adding a
text box (named txtGrp0Cnt) to the group0 header with the
control source expression =Count(*).

Next, add a text box (named txtGrp2RunCnt) to the group2
header. Set this text box's control source expression to
=Count(*) and set and its Running Sum property to Over
Group. This text box's value will equal the the value in
txtGrp0Cnt when you are in the last group2 footer.

To determine if a section is at the top of a page, you can
check the report's Top property. This property has the top
of the section's position on the page (including margin).

The code in the group2 footer section's Format event
procedure will then be like this:

If Me.Top = .5 * 1440 Then '1/2 inch margin
Cancel = (Me.txtGrp2RunCnt = Me.txtGrp0Cnt)
End If
 

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