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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating an Avg of Avg's in a Report

Status
Not open for further replies.
Jun 4, 2004
159
US
I am creating a report for softball stats. I have a column listing the batting averages that are calculated in the report. In the report footer I would like to calculate the "team batting average" by taking an average of the batting averages. I tried using this expression =Avg([Avg]). But, when I run the report, nothing comes up. What am I doing wrong??

K. Kemp

 
I would not use Avg as a field or control name because, as you can see, Avg has meaning to Access.

You can try this, though: rename the batting averages textbox txtAvg and then, in the footer, use =Avg([txtAvg])

Lilliabeth
-Why use a big word when a diminutive one will do?-
 
You can't Avg(), Sum(), or perform any other aggregate function on a control from another section of the report. It doesn't make any difference what the name of the control is.

You can use something like:
=Sum([Hits)/Sum(AtBats)
or similar. You might need to tell us what your Avgerage calculation is if you can't figure this out.

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]
 
Hi,

I have a table called changerecord, which has the following data field:

Username ChangeDate
Amy 07/13/2006
Amy 07/13/2006
Amy 07/14/2006
Amy 07/18/2006
Amy 07/31/2006
Michelle 07/13/2006
Michelle 07/19/2006
Michelle 07/25/2006
Michelle 08/10/2006
Wenda 07/14/2006
Wenda 07/20/2006


I would like to create a report which shows the total changes made per day by user. For example,

Report Name: Changes Made by User
UserName 07/13/2006 07/14/2006 07/15/2006...
Amy 2 1 0
Michelle 2 0 0
Wenda 0 1 0


So far, I wrote a quert that shows the total count of changes by user but cannot group them by date...

SELECT [dbo_ClickonAudit].[UserName], Count(*) AS [# of Changes Made]
FROM dbo_ClickonAudit
GROUP BY [dbo_ClickonAudit].[UserName];

Please advise!


 
You should really create a new thread for this question. You might want to check the FAQs of this forum for monthly crosstab reports (or similar) that I authored.

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]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top