Microsoft KB Archive/88926

= ACC: Cannot Group by Memo or OLE Object Fields in Query =

Article ID: 88926

Article Last Modified on 1/18/2007

-

APPLIES TO


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

-



This article was previously published under Q88926



Novice: Requires knowledge of the user interface on single-user computers.



SUMMARY
If you attempt to create a select, update, or append query that groups by a Memo field or OLE Object field, you may receive the following error message:

Can't group on Memo or OLE object.

Microsoft Access cannot group by a Memo field or OLE Object field in a query. Also, the GROUP BY clause of a SQL statement cannot include Memo or OLE Object fields.

To include a Memo or OLE object field in a totals query, drag the field to the QBE grid and select the aggregate (totals) function First or Last in the Total row for that field.



MORE INFORMATION
You can group by the first  characters in a Memo field by using an expression. To group by the first 25 characters in a Memo field called Description, follow these steps:


 * 1) Enter the following expression in the QBE grid:

Expr:Left([Description],25)
 * 1) Click the Totals button on the toolbar.
 * 2) In the Total row, select Group By.
 * 3) Switch to Datasheet view. Note that &quot;Expr&quot; is the column header, and no error message appears.

Keywords: kberrmsg kbinfo kbusage KB88926

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.