Calculations in VBA or queries?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am developing some fairly complex reports involving detail data summary
data and calculations. I need to be able to save the results of some of the
calculations to be used in different reports.

To complicate things even more, I would like to be able to present the data
in a spread sheet format.
Would it be better build functions to do the calculations in VBA or try to
create queries that will do the calculations?
To do the VBA will I have to code the ADODB connections and so forth?
 
Do not calculate using the report. Calculate in query. Then export the query
to excel. Use just need the vba to export the query. That's all.
 
I am developing some fairly complex reports involving detail data summary
data and calculations. I need to be able to save the results of some of the
calculations to be used in different reports.

To complicate things even more, I would like to be able to present the data
in a spread sheet format.
Would it be better build functions to do the calculations in VBA or try to
create queries that will do the calculations?
To do the VBA will I have to code the ADODB connections and so forth?

What kind of calculations? SQL queries are great for set operations
(e.g. determining which data should be used in a calculation, the
criteria for which may be complex) but not so great for mathematical
and statistical calculations.

Jamie.

--
 
These calculations will be subtotals and grandtotals, and percentages. The
results will need to be accessed by other reports.
 
If you only want to do subtotals and percentages like that, a simple append
query to a new table should do it. Then run the report/export the table to
excel using VBA if you want automation. Or you can just do file-export.
 
Back
Top