Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

grouping problems

Status
Not open for further replies.

aspnetuser

Technical User
Sep 9, 2004
273
US
I have a group where I am calcing total hours. I have a formula in the details section of the report canvas that performs an If statement that says if the underlying record is 1 then total hours. This works perfectly. The name of this formula is total. When I try in the group footer to sum this name =sum(total) so it will only sum the values that the if statement calced, it fails?

Access poject, backend sql server

any ideas?
 
You can't sum() controls. You can sum expression from control sources. For instance you could use:
=Sum(IIf([President]="Kerry",5, 10))

Duane
MS Access MVP
[green]Ask a great question, get a great answer.[/green]
[red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
[blue]Ask me about my grandson, get a grand answer.[/blue]
 
Ok, I tried to sum the IIF statement in the group footer. i get an error aggregate functions are only allowed on output fields of the record source.

how can I sum this IIF at group level, their has to be away.
 
What is the expression entered into the text box "total" in your detail section? What expression did you enter that caused the error?

Duane
MS Access MVP
[green]Ask a great question, get a great answer.[/green]
[red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
[blue]Ask me about my grandson, get a grand answer.[/blue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top