I have a report that calculates totals of dollars, I want to take that sum and move it to a table or store it somewhere I can re-use it. Is this possible?
That does seem the hard way to do things. You should be able to do the calculations right in a query and use them from there but you can store the calculation in a Table if you want. You would need to put something like this in the Format event in the Section your Textbox is in.
Dim strSQL as String
strSQL = "Insert Into TableName([FieldName]) Values (" & [ControlName] & ""
DoCmd.SetWarnings False
DoCmd.RunSQL strSQL
DoCmd.SetWarnings True
You will probably want to set up a delete query that deletes the records from TableName when the Report is opened so that if you run this multiple times you don't store values that you don't want but you will need to decide this.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.