field sum

I want to total field values from a query and show the result under this column of field values in the report.
Each record lists the modules taken by a particular student and the appropriate fee for that module. I need to sum these per student.
rrraaaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DedushkaCommented:
Hi rrraaa.
Assuming you have 2 tables:
tblStudent(StudentId, StudentName)
tblFee(StudentId, ModuleId, ModuleFee)

create and run this query:
SELECT First(tblStudent.StudentName) AS FirstOfStudentName, Sum(tblFee.ModuleFee) AS SumOfModuleFee
FROM tblStudent INNER JOIN tblFee ON tblStudent.StudentId = tblFee.StudentId
GROUP BY tblStudent.StudentId
ORDER BY First(tblStudent.StudentName);

Tested under Access2000.

Regards,
Dedushka
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rrraaaAuthor Commented:
Thankyou. I came in to delete the question as I posted after a while of frustatingly not being able to find out how. After posting the question I found that you can just sum a column in the report using the wizard. Boy did i feel dumb! lol. Anyways, the sql will never go astray so i'll give the points to you.
Thanks heaps!!
0
DedushkaCommented:
Hi rrraaa,
thanks for accepting my comment.

Have a nice day,
Dedushka
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Hardware

From novice to tech pro — start learning today.