ACC: "Can't Group on Fields Selected with '*'" Error Message

ID: Q103189


The information in this article applies to:
  • Microsoft Access versions 2.0, 7.0, 97


SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills

When you set the Output All Fields query property to Yes, you may receive the following error message:

Can't group on fields selected with '*'.


CAUSE

This error message occurs when you are attempting to use aggregate (totals) functions without setting the Output All Fields query property to No.


RESOLUTION

The following procedure shows you how to set this property for your query with aggregate functions:

  1. Open the query in Design view.


  2. Make sure that the Properties command on the View menu is checked, so that the property sheet is being displayed. Click anywhere in the Query window outside of the query grid and the field lists. Set the Output All Fields property to No.



MORE INFORMATION

Steps to Reproduce Behavior

  1. Open the sample database Northwind.mdb (or NWIND.MDB in version 2.0).


  2. Run the Order Subtotals query, which uses the aggregate function Sum(), to confirm that it works correctly.


  3. View the Order Subtotals query in Design view.


  4. Set the Output All Fields property to Yes.


  5. Run the query. Note that you receive the error in the symptoms section of this article.



REFERENCES

For more information about setting the OutputAllFields property, search for "Setting Query Properties," and then "Set properties for a query, its fields, or its field lists" using the Office Assistant or the Answer Wizard in Microsoft Access on-line help.

For more information about setting the OutputAllFields property, search for "Setting Query Properties" using the Microsoft Access 2.0 Help menu.

Keywords : kbusage QryTotal
Version : WINDOWS:2.0,7.0,97
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: September 16, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.