sum subform, display total in form

  • Thread starter Thread starter anna
  • Start date Start date
A

anna

This is what I have so far:

I have a table Materials that holds data from a subform.
The fields are part_number, length, width. When the user inputs a
part_number a cost is found (linked form another table) and that cost
is then used along with the Length and width to find a cost_per_piece.


The cost_per_piece is in the subform as a caluclated field... Not
stored in the Materials table. If it was I could do a DSUM calculation.


Is there anyway to sum values in a form, that are not stored?
If not, how do I write the value to my table so that I can sum?

Thanks
anna
 
Anna,

I am assuming your subform is a continuous view form. Am I right?
You need to put an unbound textbox in the Form Footer of the subform.
In the controlsource of this textbox, you need to use a Sum() function
to get your total. In the sum function, you have to use the same
calculation as you are using in the detail to get the cost_per_piece.
If you need more specific help, you will need to post back with more
details, perhaps with examples, of what you are doing so far, and at
least let us see the cost_per_piece calculation expression.

- Steve Schapel, Microsoft Access MVP
 
Back
Top