Sum subform

  • Thread starter Thread starter Sherry
  • Start date Start date
S

Sherry

For some reason, although I posted this as a new reply, I
noticed it posted as a reply to a previous post, so I'm
trying again here in hopes of getting a responese.



I have a subform that has completed subjects per week on
each line. EAch subject is given a certain number of
points and then a total is calculated. (For instance,
for the week of 9/9/04, if a child completed Math, they
get 100 pts, Reading 200, pts, Science 100 pts, and all
these are total for 400 pts for the week. What I am
wanting to do is show a running total of the child's
cummulative points on the main form. I have done this in
the past but can't remember how, and I'm sure it's just a
simple matter of syntax, but I can't seem to get the
formula to do this quite right.
I think I have to first put some kind of formula in the
footer of the subform, then link to that on the main
form. Is that correct? And if so, what syntax would I
use?
Help is most greatly appreciated.
Sherry
Rome, GA
 
I presume one record per subject
Put a control in the page footer of your subform (invisible if desired) name
it sumofpoints
set the control source to be =sum(points)
make an unbound control on the main form called sumpoints

then place this code in the Form_Current() event (subform)
Sub Form_current()
dim frm as access.form
set frm = me.parent.form
frm!sumpoints=me!SumOfPoints
end sub

HTH

Pieter
 
-----Original Message-----
I presume one record per subject
Put a control in the page footer of your subform (invisible if desired) name
it sumofpoints
set the control source to be =sum(points)
make an unbound control on the main form called sumpoints

then place this code in the Form_Current() event (subform)
Sub Form_current()
dim frm as access.form
set frm = me.parent.form
frm!sumpoints=me!SumOfPoints
end sub

HTH

Pieter





.
 
Actually, it is multiple subjects per record, so I don't
think this will work. Is there anyway you can email me
and let me send you a copy of the database for you to
look at? I'm a very pitiful Access user, but I try, so
my database is pretty simple.

Thanks,
Sherry
 

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

Back
Top