Calculate the totals on a form

G1ZmO

Registered User.
Local time
Today, 17:00
Joined
May 4, 2006
Messages
133
I've searched the forum and cant seem to come up with an answer to this silly wee problem

I have a form which shows the relative weights of different jobs on a pallet and I want to have a total at the bottom.

There are plenty posts concerning summing fields in the same record but not from different records.

My form shows the pallet ID and below shows the Job No and Weight

e.g.
JobNo: Job0001 Weight: 85
JobNo: Job0002 Weight: 43
JobNo: Job0003 Weight: 121

And I need a SUM of these shown on the form.

I tried a sum query and then adding in a sub-form but it stuffed up my form layout saying that it couldnt have its view set to continuous forms??

Is there any way I can just add a field to calculate this value without adding in another query/subform?

I don't need to store the value, only display it for the printed form.

Thanks

Paul
 
Its ok, solved

=Sum([Weight])

Doh!
 
Its ok, solved

=Sum([Weight])

Doh!

better way is:
=Sum(Nz([Weight],0))

This insures the answer will be converted to a 0 if any of your weight value is null.
 
Thanks accessNator, I'll bear that in mind for other forms as this one can never have a null value against the weight field.

Cheers

Paul
 

Users who are viewing this thread

Back
Top Bottom