CrossTabReport.mdb (intermediate)

Please consider donating $1 per sample downloaded, find out why here
Download
CrossTabReport.zip
Access 97 (38 KB)

The problem with crosstab queries has always been that if you try to make a report based on one, you inevitably have problems with field names when the crosstab changes. This sample demonstrates how you can get around this problem.

Every time the report is run, there is code in the report which takes the values from the crosstab queries and writes them into a "generic" query which has field names like "Field1, Field2, and so on". This allows you to base your report names on these generic names and step through them in code.

Both of the reports below have the same record source: "qryCrossTabReport", yet they have differing numbers of rows and columns. When the report is run, it takes data from the appropriate query and transforms it into qryCrossTabReport. See the code behind each report for details.

 

Feedback

 

Need Winzip?

Return to Main Page