Microsoft KB Archive/103189

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

Article ID: 103189

Article Last Modified on 1/18/2007

-

APPLIES TO


 * Microsoft Access 2.0 Standard Edition
 * Microsoft Access 95 Standard Edition
 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q103189



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



SYMPTOMS
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.



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.

