conditional page footer

  • Thread starter leah f via AccessMonster.com
  • Start date
L

leah f via AccessMonster.com

I have a report of students in classes (grouped by classes). If a class
has more students than fit on one page, I would like to have a line under
the last student on the page.

How can I put a page footer conditional on whether or not there is a group
break? I do not want a line on the bottom of every page.

Each class does not begin with Page 1.

Thanks.
Leah
 
G

Guest

Add a group footer for the class group, and add a line in that section, you
could make it different from the page footer's line or delete the line in the
page footer
 
L

leah f via AccessMonster.com

I am not at work today to try anything. What I understand that you are
suggesting, is writing a script which makes the page footer line invisible
when there is a group break.

I think that I had tried finding a command to make the line invisible but
had trouble. I will check it out tomorrow (May 10th).

Thanks for the suggestion.
Leah
 
L

leah f via AccessMonster.com

I tried defining a BorderStyle for the line
Line187.Report.BorderStyle = 0

but received the message "This action can't be carried out while processing
a form or report event".

Is there any vba command that I can use to make the page footer invisible
when there is a group break?
 
G

Guest

What I was suggesting is that you delete the line in the page footer
alltogether from the design view of the report, and then create a grouping in
your report by class, make the group footer visible and draw a line in the
group footer
 
L

leah f via AccessMonster.com

Thanks, but that is exactly what I now have, but since there is a border
around the report, the first page does not have a bottom border because the
bottom line is only at the end of the group.
 
G

Guest

Try this:

-Draw a line in the page footer
-In the On Print event of your class group FOOTER change the page footer's
borderstyle to 0:

Private Sub GroupFooter0_Print(Cancel As Integer, PrintCount As Integer)
Me.PageFootLine.Properties("BorderStyle") = 0
End Sub

(Normally you'll have LineXX instead of PageFootLine for the name of the
line)

-Turn the borderstyle to 1 in the group HEADER On print Event
Private Sub GroupHeader0_Print(Cancel As Integer, PrintCount As Integer)
Me.PageFootLine.Properties("BorderStyle") = 1
End Sub

Every time a new group starts it will default to have the page footer line
print, but when the group footer is the last one to print in a page, the page
footer line will "disappear"
 
L

leah f via AccessMonster.com

Okay. When I am at work on Sunday I will try changing the border style in
the OnPrint event in the class group break. Thanks so much. I will let
you know.
 
L

leah f via AccessMonster.com

It doesn't seem to be working. I purposely drew a line with dashes so I
can know for sure if the line in the page footer is printing. It is not
printing at all (except on the bottom of the report header).

KeepTogether is set to No.
GroupOn is set to Each Value.
 
L

leah f via AccessMonster.com

Basically, but I have each group beginning on a new page.
These are the first few pages :

1 - header page: Shows footer but I didn't even try to get rid of it.
2 - new group that goes beyond the page: has footer - good.
3 - end of group: no footer - also good.
FINE SO FAR, BUT...
4 - new group that goes beyond the page: no footer - no good.
5 - end of group: no footer - good.
And so on...all the rest of the pages have no footer.

I so appreciate your help...
Leah
 
L

leah f via AccessMonster.com

I am leaving work now, but I might have solved the problem by checking the
total lines printed on a page.

My problem though is now why the first full page is 19 lines and the rest
are 20.

Another way that I might solve the problem is by putting a thin line
between each record and that looks like the direction that I will take. It
is not so terrible to have a thin line at the end of a page when the group
continues.

Once again, thanks so much.
Leah
 

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