Can't refer to Detail Report control on Page Footer?

J

Jaazaniah

I have a control in the detail section ([TotalHrs]) of my report that
adds the Nz([DayValues],0) together for 16 other controls. This
control works fine.

The report is grouped on EmpID, with a force new page on new value
(using the ForceNewPage After Section in the EmpID Footer).

Now, in the page footer, I have a control ([SumTotalHrs]) that I want
to total the section's worth of hours (By using the running sum
feature Over Section). Granted, this will not look correct if EmpID's
section is more than two pages, but it doesn't even work. Apparently
I'm doing something wrong. I've tried referring to TotalHrs by:

TotalHrs
[TotalHrs]
[Reports]![rpt_TimeSheet]![TotalHrs]

And each time I get an error as if the field does not exist. I get a
prompt box for value when using [TotalHrs], and a dialog saying that
Access can't find the field when using [Reports]![rpt_TimeSheet]!
[TotalHrs]. Also, with error checking on, (Access 2003) it says there
is no such field in the field list when using [Reports]!
[rpt_TimeSheet]![TotalHrs]. I know it's not in the field list! Can
anyone help remedy my issue?
 
D

Duane Hookom

You need to put some equal signs in there. If you have a text box in the
detail section and want to display its value in the Page Footer, try:
=[NameOfTextBoxFromDetailSection]
 
J

Jaazaniah

You need to put some equal signs in there. If you have a text box in the
detail section and want to display its value in the Page Footer, try:
=[NameOfTextBoxFromDetailSection]

--
Duane Hookom
Microsoft Access MVP

Jaazaniah said:
I have a control in the detail section ([TotalHrs]) of my report that
adds the Nz([DayValues],0) together for 16 other controls. This
control works fine.
The report is grouped on EmpID, with a force new page on new value
(using the ForceNewPage After Section in the EmpID Footer).
Now, in the page footer, I have a control ([SumTotalHrs]) that I want
to total the section's worth of hours (By using the running sum
feature Over Section). Granted, this will not look correct if EmpID's
section is more than two pages, but it doesn't even work. Apparently
I'm doing something wrong. I've tried referring to TotalHrs by:
TotalHrs
[TotalHrs]
[Reports]![rpt_TimeSheet]![TotalHrs]

And each time I get an error as if the field does not exist. I get a
prompt box for value when using [TotalHrs], and a dialog saying that
Access can't find the field when using [Reports]![rpt_TimeSheet]!
[TotalHrs]. Also, with error checking on, (Access 2003) it says there
is no such field in the field list when using [Reports]!
[rpt_TimeSheet]![TotalHrs]. I know it's not in the field list! Can
anyone help remedy my issue?

Ok, I can refer to the control directly when using =[TotalHrs], but
now I have a new issue. The page footer totals won't display. I tried
making their control source the same as the days columns they're
totaling and turning Running Sum to Over Group, but it seems doing
that only returns the last record (not the sum of records) returned
before the page ended. So upon trying to change the Control source to
=Sum([Day01]) for instance, I get #Error. I can make the control refer
to =[Day01] with the Running Sum on, but it returns the same thing as
using the same query field [Day01] uses. My question is what function
can I use to achieve the desired result?
 
D

Duane Hookom

There is a knowledgebase article on page totals at
http://support.microsoft.com/kb/216311/en-us.
--
Duane Hookom
Microsoft Access MVP


Jaazaniah said:
You need to put some equal signs in there. If you have a text box in the
detail section and want to display its value in the Page Footer, try:
=[NameOfTextBoxFromDetailSection]

--
Duane Hookom
Microsoft Access MVP

Jaazaniah said:
I have a control in the detail section ([TotalHrs]) of my report that
adds the Nz([DayValues],0) together for 16 other controls. This
control works fine.
The report is grouped on EmpID, with a force new page on new value
(using the ForceNewPage After Section in the EmpID Footer).
Now, in the page footer, I have a control ([SumTotalHrs]) that I want
to total the section's worth of hours (By using the running sum
feature Over Section). Granted, this will not look correct if EmpID's
section is more than two pages, but it doesn't even work. Apparently
I'm doing something wrong. I've tried referring to TotalHrs by:
TotalHrs
[TotalHrs]
[Reports]![rpt_TimeSheet]![TotalHrs]

And each time I get an error as if the field does not exist. I get a
prompt box for value when using [TotalHrs], and a dialog saying that
Access can't find the field when using [Reports]![rpt_TimeSheet]!
[TotalHrs]. Also, with error checking on, (Access 2003) it says there
is no such field in the field list when using [Reports]!
[rpt_TimeSheet]![TotalHrs]. I know it's not in the field list! Can
anyone help remedy my issue?

Ok, I can refer to the control directly when using =[TotalHrs], but
now I have a new issue. The page footer totals won't display. I tried
making their control source the same as the days columns they're
totaling and turning Running Sum to Over Group, but it seems doing
that only returns the last record (not the sum of records) returned
before the page ended. So upon trying to change the Control source to
=Sum([Day01]) for instance, I get #Error. I can make the control refer
to =[Day01] with the Running Sum on, but it returns the same thing as
using the same query field [Day01] uses. My question is what function
can I use to achieve the desired result?
 

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