CrossTabReport.mdb (intermediate) |
Post Reply |
Author | |
Roger Carlson
Microsoft MVP Joined: 20 Feb 2008 Status: Offline Points: 261 |
Post Options
Thanks(0)
Posted: 01 Aug 2008 at 6:08am |
Please consider donating $1 per sample downloaded, find out why here.
CrossTabReport.mdb 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. |
|
|
|
Sponsored Links | Want a good read? Try The Summer of His Life (available on Amazon!) |
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |