473,320 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Error message of "Subquery can't be used in Sum(SumAtt), when I try to Sum The Sum

I am creating a report that would generate a Summary report for Student Activity Attendance. Every student can attend multiple activities, and my
report group by student, name, and activity. Then I sum the attendance for
each individual activity, as compared to the required attendance ( I get this
from count of activity record). Next comes the Total Attendance for each student. I use Sum(SumofAttendance), Access prompt me with "Subquery can't be used in Sum of Sum" error.

I read your old discussion, and you are POSITIVE that I can "Sum the Sum".
The only difference is that this is a QUERY I use in my report.
I use Acces 2002 version.
How to FIX this error and go on?????

Below is the query---------->
SELECT [Dayly Attendance].StudentID AS Lynn, Student.LastName, Student.FirsName, [Dayly Attendance].ProgramNumber, Sum([Dayly Attendance].Attendance) AS SumAtt, Count([Dayly Attendance].ProgramNumber) AS SumSec, Sum([SumAtt]) AS SumMonAtt, Sum([SumSec]) AS SumMonSec
FROM Student INNER JOIN [Dayly Attendance] ON Student.StudentID = [Dayly Attendance].StudentID
WHERE ((([Dayly Attendance].Date) Between #3/1/2007# And #3/30/2007#))
GROUP BY [Dayly Attendance].StudentID, Student.LastName, Student.FirsName, [Dayly Attendance].ProgramNumber
ORDER BY Student.LastName, Student.FirsName, [Dayly Attendance].ProgramNumber;


THANKS for A TONS............

Lynn
Mar 13 '07 #1
2 1444
MMcCarthy
14,534 Expert Mod 8TB
Is [Dayly Attendance] a query if so please post the SQL.

Mary
Mar 13 '07 #2
NeoPa
32,556 Expert Mod 16PB
The error message gives the clue :
You're trying to use the Sum() function on values that are already the results of being summed. That is not supported (as it's quite illogical).
Mar 15 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Familie Spies | last post by:
Hi all, When running a program I made in VB under Windows XP i'm getting the following error: ! Compile error. Can't find project or library. (see also http://home.kabelfoon.nl/~hspies/2.jpg ) ...
4
by: sparks | last post by:
As you might know that "java.lang" package are automatically imported by the java compiler so that one don't need to write the import statement of that package in the source code. Are there any...
1
by: Michael Dekson | last post by:
In the report, when the result is 0 I would like to see 0 insted of #Error Sum. What must I do? Thanks
2
by: Tommy Vercetti | last post by:
I am working on a Managed C++ project and I get the following error: TestThread.cpp(3) : error C2859: c:\projects\ProjectName\debug\vc70.pdb is not the pdb file that was used when this...
3
by: David Lozzi | last post by:
Error: Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive at line 6 Line 4: <script RUNAT="SERVER"> Line 5: ...
0
by: Rick | last post by:
I am getting a "Session state can only be used when enableSessionState is set to true" error. it works on the first form where I am writing some data to a dictionary(Dictionarybase). After the...
6
by: KevinGravelle | last post by:
What is wrong with this picture? I'm trying to set my shopping cart text on my home page using the following function that is executed when the class is constructed: protected string...
3
by: Paul | last post by:
Hi All, In my application, I wished to check certain things on each page load, so rather than paste the same code in each pages constructor, I thought it would be more logical to inherit from...
2
by: wouter | last post by:
Hello, Being a chemical engineering i'm only little acquainted with programming. However I made a made a excel program with macro's using VBA. This program is used a lot in our company. However...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.