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

ID: Q88926


The information in this article applies to:


SUMMARY

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

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 (<fieldname>).

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 <n> 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)


  2. Click the Totals button on the toolbar.


  3. In the Total row, select Group By.


  4. Switch to Datasheet view. Note that "Expr" is the column header, and no error message appears.



Keywords          : kberrmsg kbusage QryTotal 
Version           : 1.0 1.1 2.0 7.0 97
Platform          : WINDOWS 
Issue type        : kbinfo 

Last Reviewed: March 10, 1999