Cannot sum in report footer based on group footer

S

Song Su

I have a calculated control on group footer called txtFlex
=IIf([semester]="Fall Full-Time",[FT_Fall],IIf([semester]="Spring
Full-Time",[FT_Spring],Sum([Hour]/2)))

I want to total it in report footer
=sum([txtFlex])

When I run the report, it asks parameter 'txtFlex' in report footer. I
double checked the spelling and it's correct. I even tried to use Expression
Builder to use mouse to pick the control but it still gives me the error
message. If I delete the control in report footer, no error message. But I
do need that summary control in report footer.

What did I do wrong?
 
J

John Spencer

You can't refer to the control to do the sum. I would try

=Sum(IIf([semester]="Fall Full-Time",[FT_Fall],IIf([semester]="Spring
Full-Time",[FT_Spring],Sum([Hour]/2)))


That may fail due to the nested Sum calls.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
S

Song Su

As you predicted, it produced 'cannot have aggregated function in
expression' error message.

John Spencer said:
You can't refer to the control to do the sum. I would try

=Sum(IIf([semester]="Fall Full-Time",[FT_Fall],IIf([semester]="Spring
Full-Time",[FT_Spring],Sum([Hour]/2)))


That may fail due to the nested Sum calls.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.

Song Su said:
I have a calculated control on group footer called txtFlex
=IIf([semester]="Fall Full-Time",[FT_Fall],IIf([semester]="Spring
Full-Time",[FT_Spring],Sum([Hour]/2)))

I want to total it in report footer
=sum([txtFlex])

When I run the report, it asks parameter 'txtFlex' in report footer. I
double checked the spelling and it's correct. I even tried to use
Expression Builder to use mouse to pick the control but it still gives me
the error message. If I delete the control in report footer, no error
message. But I do need that summary control in report footer.

What did I do wrong?
 

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