ACC: "Can't group on fields selected with '*'" Error Message

Last reviewed: May 28, 1997
Article ID: Q103189
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1, 2.0, 7.0

SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills

When you set the following query property, you may receive the error message "Can't group on fields selected with '*'":

   Version                        Property                     Value
   -----------------------------------------------------------------
   Microsoft Access 2.0 and 7.0   Output All Fields            Yes
   Microsoft Access 1.x           Restrict Available Fields    No

CAUSE

This error message occurs when you are attempting to use aggregate (totals) functions without setting the Output All Fields query property to No for version 2.0 and 7.0, or without selecting the Restrict Available Fields property for version 1.x.

RESOLUTION

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

  1. Open the query in Design view.

  2. In version 2.0 and 7.0, 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.

    In version 1.x, from the View menu, choose Query Properties. Then, select the Restrict Available Fields option.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Open the sample database Northwind.mdb (or NWIND.MDB in versions 1.x and 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. In version 2.0 and 7.0, set the Output All Fields property to Yes.

    In version 1.x, clear the Restrict Available Fields check box.

  5. Run the query. Note that you receive the following error: "Can't group on fields selected with '*'."

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 Answer Wizard from the Microsoft Access for Windows 95 Help menu.

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 : 1.0 1.1 2.0 7.0
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
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 28, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.