B
Brad
I want to create a report and calculate values based upon multiple SQL
criteria. I know how do this by creating multiple queries doing a
union query and then making the report but, to make it cleaner and
because of the number of queries that would take what I would like to
do calculate the values based upon SQL statement in VBA.
Here is specifically what I want to do.
I am calculating number of accounts and total dollar value for each
month. Then from the same data I want the number that fall into
several categories, then from those categories I want to further break
that down based upon another set of criteria and so on for several
levels. Each value will be reported in columns across the page with
each row being the month.
Can I just create code that performs the sql and sets that as the data
source for each field and is there any special VBA code that needs to
be included so this works correctly.
Anybody done this and have some sample code to share?
criteria. I know how do this by creating multiple queries doing a
union query and then making the report but, to make it cleaner and
because of the number of queries that would take what I would like to
do calculate the values based upon SQL statement in VBA.
Here is specifically what I want to do.
I am calculating number of accounts and total dollar value for each
month. Then from the same data I want the number that fall into
several categories, then from those categories I want to further break
that down based upon another set of criteria and so on for several
levels. Each value will be reported in columns across the page with
each row being the month.
Can I just create code that performs the sql and sets that as the data
source for each field and is there any special VBA code that needs to
be included so this works correctly.
Anybody done this and have some sample code to share?