Running Totals Problem

D

Dale Clarke

Hello,

I need some help with obtaining a total on a form. I need to verify
that I have the expression in the right place to obtain the anticipated
result. I am using Access 2000 on a Win2K system.

On a continuous form, I have a text box for Estimated Cost, Actual Cost
and a third for Adjusted cost in the detail section of the form. The
first two are actual data entry fields using a currency data type. The
third is populated by using a calculating expression on the other two
text fields. The below expression is in the control source of the third
text box (AdjCost). It reads as follows:

=Format(IIf([ActCost]=0,"",[EstCost]-[ActCost]),"$#,##0.00;($#,##0.00)")

This portion of the form all seems to work fine. The problem I am
having is getting the third field to sum at the bottom of the form. I
have three text boxes in the form footer, which does a running total for
each of the three fields in the detail section. My problem is that I am
unable to get the third text box in the footer to sum the Adjusted Cost
total. I am using the following expression in the control source for
this text box:

=Sum([AdjCost])

When I open the form I get #Error in all of the sum text boxes in the
footer section. If I remove the =Sum([AdjCost]) from the control source
of the third text box, the other two text boxes total correctly. I
believe the problem is with the expression in the control source in the
AdjCost text box in the detail section of the form. Any help in how to
correctly make the three text boxes in the footer section total
correctly would be greatly appreciated.
 

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

Similar Threads


Top