Select the product you need help with
ACC2000: How to Group Column Headings in a Crosstab QueryArticle ID: 209141 - View products that this article applies to. This article was previously published under Q209141 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies only to a Microsoft Access database (.mdb). SUMMARY
This article describes how to group values in a crosstab query by using a
fixed number of headings, rather than by having a column for every value.
NOTE: You can see a demonstration of the technique that is used in this article in the sample file Qrysmp00.exe. For information about how to obtain this sample file, please see the following article in the Microsoft Knowledge Base: 207626
(http://support.microsoft.com/kb/207626/EN-US/
)
ACC2000: Access 2000 Sample Queries Available in Download Center
MORE INFORMATION
The following example demonstrates how to use the Switch() function to group non-numeric values under four fixed headings. The headings are
"A-F," "G-O," "P-Z," and "Other." CAUTION: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database.
REFERENCESFor more information about crosstab queries, click Microsoft Access Help on the
Help menu, type create a crosstab report with fixed-column headings in the Office Assistant or
the Answer Wizard, and then click Search to view the topics
returned. For more information about the switch function, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type switch function example in the Office Assistant or the Answer Wizard, and then click Search to view the topic. PropertiesArticle ID: 209141 - Last Review: June 24, 2004 - Revision: 2.0
|


Back to the top








