Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

store calculated field in form to table

Status
Not open for further replies.

max1313

Technical User
Sep 27, 2002
2
US
Hello,
Hope you can follow me here. I have a form containing a subform (run from 2 different queries). The subform calculates an extended value ([Price]*[Qty]) for 1 or more records in the subform. The total is calculated on the main form with the following equation:

=[XYZsubform].[Form]![sumofextended] in the Control Source

This populates a calculated field with the sum of all extended values. I would like to use that calculated sum in a report. What is the best way to accomplish that? I know it's a sin, but do I need to store that value in a field in a table? Is there a VB code that I can write? Please help!
 
I would avoid at all costs storing a calculated value in a table, unless you want it for historical purposes.

If you already have a form/subform relationship working, you should be able to replicate the logic in a report/subreport method.
 
Thanks for the advise. I would actually like it for historical purposes. How could I do that?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top