ACC: Cannot Set ColumnHeadings Property of Crosstab Using Code

Last reviewed: May 12, 1997
Article ID: Q155667
The information in this article applies to:
  • Microsoft Access versions 2.0, 7.0

SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills.

The online Help topic for the ColumnHeadings property reads as follows:

Version 7.0

   You can set this property using the query property sheet or Visual
   Basic.

Version 2.0

   You can set this property using the query property sheet, a query's SQL
   view, or Access Basic.

The documentation is incorrect. The ColumnHeadings property cannot be set using Visual Basic for Applications (or Access Basic in version 2.0).

MORE INFORMATION

The ColumnHeadings property is not an exposed property of the QueryDef object. It can be created and then appended to the Querydef's properties collection, but it will have no effect on the actual column headings for the crosstab query.

You can change the column headings in a crosstab query by using one of the following methods:

  • set the ColumnHeadings property on the query's property sheet.
  • modify the PIVOT clause in the SQL view of the query.
  • modify the PIVOT clause of the QueryDef object's SQL property using Visual Basic for Applications.

To see an example of how to programmatically change the column headings of a crosstab query, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q155489
   TITLE     : ACC: Changing Column Headings in a Crosstab Query Using Code

REFERENCES

For more information about the ColumnHeadings property , search for "ColumnHeadings property," using the Microsoft Access for Windows 95 Help Index.

For more information about SQL property of a QueryDef object, search for "Querydef objects," and then "SQL property" using the Microsoft Access 7.0 Help Index.


Keywords : DcmHlp kbusage
Version : 2.0 7.0
Platform : WINDOWS
Hardware : X86
Issue type : kbdocerr
Resolution Type : Info_Provided


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 12, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.