Summing scores and putting on a form

B

Bob Brewer

Hi,

I have a table (tblScores) that contains:

ScoreID (index)
StudentID
TestID
Score

I have a form (frmScores) that has:

StudentID
Total Test Scores

The form has 40 controls (20 x test box for studentID, 20
x text box for Total test scores).

The studentIDs are updated manually i.e direct input to
the form. So at present, I have a form populated with 20
studentIDs.

I am trying to work out how to sum all the test scores
from tblScores for each individual student and present it
on the form (in TotalTestScores control). I want to end up
with something like:

StudentID = 1 Total Test Score = 100
StudentID = 2 Total Test Score = 65
StudentID = 3 Total Test Score = 120
etc....

Any help would be greatly appreciated.

Thanks

Bob (an Access novice)
 
M

Mike

DSum is your answer.

In the Control Source of TotalTestScores, enter the following.

=DSum("Score","tblScores","StudentID=" & [StudentID])
 

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