Page Footer sum Microsoft solution question

M

Michael

Here is what I did which also includes my page break code form a previous
solution:

VB is giving an error Microsoft Access can't find the field 'RunSum'
referred to in your express. This line it highlights is: "Me!PageSum =
Me!RunSum - x" sans quotes.

'This is the start of the code

Option Compare Database

Dim x As Double

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

Me.Section(0).ForceNewPage = IIf(txtLineNum1 Mod 28 = 0, 1, 0)

End Sub

Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As
Integer)

End Sub

Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As
Integer)
Me!PageSum = Me!RunSum - x
x = Me!RunSum
End Sub

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)

End Sub

Private Sub ReportHeader_Print(Cancel As Integer, PrintCount As Integer)
x = 0
End Sub

'This is the end of the code

Okay I figured out one problem with the fact that I didn't make the edits to
my report that the Northwind report had to
have made to it. However, I get a total on the 2nd page's page footer but
not on the first. What's up with that?

Let me clarify that. I get 0 as a total which is not a true total.
 
M

Michael

Oh by the way, it's actually taking the last PostingAmt and listnig it as
the total.

Michael said:
Here is what I did which also includes my page break code form a previous
solution:

VB is giving an error Microsoft Access can't find the field 'RunSum'
referred to in your express. This line it highlights is: "Me!PageSum =
Me!RunSum - x" sans quotes.

'This is the start of the code

Option Compare Database

Dim x As Double

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

Me.Section(0).ForceNewPage = IIf(txtLineNum1 Mod 28 = 0, 1, 0)

End Sub

Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As
Integer)

End Sub

Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As
Integer)
Me!PageSum = Me!RunSum - x
x = Me!RunSum
End Sub

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)

End Sub

Private Sub ReportHeader_Print(Cancel As Integer, PrintCount As Integer)
x = 0
End Sub

'This is the end of the code

Okay I figured out one problem with the fact that I didn't make the edits
to my report that the Northwind report had to
have made to it. However, I get a total on the 2nd page's page footer
but not on the first. What's up with that?

Let me clarify that. I get 0 as a total which is not a true total.
 
M

Michael

I figured it out. I put the PageSum in the Page Footer instead of in the
detail. It works great now.
 
M

Michael

The only problem now is the subreport's first 28 records, even though it
skips to 29th record on 2nd page in subreport by itself, simply repeats that
first 28 records on page 2.
 
M

Marshall Barton

Michael said:
The only problem now is the subreport's first 28 records, even though it
skips to 29th record on 2nd page in subreport by itself, simply repeats that
first 28 records on page 2.


I can't see how the page total changes can have anything to
do with this new problem. Check other places, especially
the links between the main report records and the subreport.
 
M

Michael

The new changes definitely are not the problem. This was happening before
that as well. Just thought you might know something about it since you seem
well versed in Access.

The subreport has the page break code, you gave me a few days ago, and it
works by itself but for some reason it seems that the main report ignores
that code when the subreport is in the page footer instead of the report
footer.
 
M

Marshall Barton

You'll have to refresh my memory as I deal with too many
threads every day to remember the details of any one,
especially after more than a week.

From what I do remember of your 28 lines per page question,
the page footer was never part of the question.

There may be several things getting in your way when using
the page footer. Most important in your case is that you
can not start a new page in a page header/footer section,
regardless of whether you are using a subreport or not. If
you want the subreport to span multiple pages, you will have
to move it out of the page footer section.
 
M

Michael

There isn't even a way to hard code the page footer to display page 2 of
subreport on page footer of page 2?

Marshall Barton said:
You'll have to refresh my memory as I deal with too many
threads every day to remember the details of any one,
especially after more than a week.

From what I do remember of your 28 lines per page question,
the page footer was never part of the question.

There may be several things getting in your way when using
the page footer. Most important in your case is that you
can not start a new page in a page header/footer section,
regardless of whether you are using a subreport or not. If
you want the subreport to span multiple pages, you will have
to move it out of the page footer section.
--
Marsh
MVP [MS Access]

The new changes definitely are not the problem. This was happening before
that as well. Just thought you might know something about it since you
seem
well versed in Access.

The subreport has the page break code, you gave me a few days ago, and it
works by itself but for some reason it seems that the main report ignores
that code when the subreport is in the page footer instead of the report
footer.

"Marshall Barton" wrote
 
M

Michael

I don't think I can successfully have it in the detail because it's going to
either repeat the subreport over and over. Or it will print 1 record from
the main report then the subreport then the 2nd record of main and so on.

Is there anyway to just make the report treat the 2nd page of the main
records and the subreport as a 2nd report somehow with the extra records?
Marshall Barton said:
You'll have to refresh my memory as I deal with too many
threads every day to remember the details of any one,
especially after more than a week.

From what I do remember of your 28 lines per page question,
the page footer was never part of the question.

There may be several things getting in your way when using
the page footer. Most important in your case is that you
can not start a new page in a page header/footer section,
regardless of whether you are using a subreport or not. If
you want the subreport to span multiple pages, you will have
to move it out of the page footer section.
--
Marsh
MVP [MS Access]

The new changes definitely are not the problem. This was happening before
that as well. Just thought you might know something about it since you
seem
well versed in Access.

The subreport has the page break code, you gave me a few days ago, and it
works by itself but for some reason it seems that the main report ignores
that code when the subreport is in the page footer instead of the report
footer.

"Marshall Barton" wrote
 
M

Marshall Barton

Of course the detail will not work. Maybe you can use a
group footer or through some tricky maneuvers, maybe some
other way. BUT I REALLY NEED TO KNOW what effect you are
trying to achieve here.

It almost sounds like you want something as bizarre as two
reports, one using the top half of the page and the other
using the bottom half.
 

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