Unless I'm overlooking something, it looks to me like all you need is a
crosstab query to accomplish your objective.
As for true dynamic report generation, we have built a tool (using VB with
Access as the back end database) that does this. Essentially it works with
a data cube, similar to the Excel pivot table except it is easier to use and
has far better report presentation capabilties. Contrary to some remarks in
this thread, we have found that there is a need for dynamic reporting that
allows an end-user to click together a report without having to create a
query first and without needing knowledge of Joins & Unions.
--
Allan Thompson
APT Associates/ FieldScope LLC
MS Office Automation / Measurement and Reporting Systems
www.fieldscope.com
860.242.4184