Problems With Sum Expression In Form

bogushs

Registered User.
Local time
Today, 11:45
Joined
May 4, 2005
Messages
27
HI THERE

I HAVE A DATABASE WHERE THERE ARE CERTAIN FIELDS THAT NEED TO BE SUMMED UP. I HAVE BUILT A UNBOUND TEXT BOXES WITH THE EXPRESSION BUILDER TO SUM THE FIELDS IM WANTING.

THIS IS FINE HOWEVER WHEN THE RESULTS ARE SUMMED ALL MY RECORDS ARE BEING SUMMED TOGETHER.
WHAT I WOULD LIKE TO DO IS TO SUM WHATS ON THE FORM. SO IN A TEXT BOX WHERE THERE IS A NUMBER 2 AND IN ANOTHER TEXT BOX THERES A 3 THEN IN THE SUM IT SHOULD EQUAL 5.

DOES ANYONE KNOW HOW TO GET AROUND THIS RATHER THAN IT SUMMING THE TOTALS FOR ALL MY RECORDS?

THE CURRENT EXPRESSION IM USING FOR MY UNBOUND TEXT BOX IS

=Sum([Development tbl]![Existing Tenure Private]+[Development tbl]![Existing Tenure Intermediate]+[Development tbl]![Existing Tenure Social])

ANY COMMENTS MUCH APPRECIATED. THANKS
 
use the expression

Code:
=[Existing Tenure Intermediate] + [Existing Tenure Social]

assuming they are the names of the controls on your form. This will add only the two fields of the current record. You could of course base your form on a query and have the calculated column in the query which would do away with the unbound control on yor form.

HTH

PS Please don't use CAPS throughout your post. It is deemed as shouting :-)
 
thank you very much. seems to work like a treat!

cheers
 

Users who are viewing this thread

Back
Top Bottom