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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help! Set Value from Calc on Report in Table

Status
Not open for further replies.

Tash

MIS
Nov 3, 2001
62
0
0
US
How can I grab a calculated value from a report and paste the value into a table? If I can do this, where would I place the code and how would I reference it? Thank you!
 
You can do the same calculation on a form or in a query.
But storing calculated value to a table is a different issue that normally not encouraged.

________________________________________________________
Zameer Abdulla
Help to find Missing people
Even a thief takes ten years to learn his trade.
 
Are you aware that this is not considered best practice in that reports are generally snapshots of the data and it is against relational database design to include calculations in tables?
That being said, the best bet might be to create a form with text boxes for the report data you wish to save and use these to reference the report:
[tt]=[Reports]![rptReport].[Report Control Name][/tt]
You could then open this form in the On Format event of the Report Footer.
Including code to update a table in the report itself could get quite messy.
 
I wish I could tell my client this! In fact, I may have to. After I have totally created the database with the "snapshot" data design in mind for a final invoice, he needs line by line values (that I created from complex calculations) exported from the database. Actually, I guess I could export the data if I created a completely different invoice design with the export in mind. Ok, I think I have an idea to go in a totally different direction. Thank you for your input and advice. This has helped me to realize that it is not good design to try to store calculations in tables.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top