ACC2002: Cannot Sort Text, Ntext, and Image Data Types in an Access Project (.adp) (295261)



The information in this article applies to:

  • Microsoft Access 2002

This article was previously published under Q295261
Novice: Requires knowledge of the user interface on single-user computers.

This article applies only to a Microsoft Access project (.adp).

SYMPTOMS

A field whose data type is text, ntext, or image cannot be sorted in a table, a query, a form, or a report in a Microsoft Access project (.adp).
  • In a table or a form, the Sort icon and the Sort menu selections are not available (dimmed).
  • When you run a query with one of these data types sorted, you receive the following error message:
    The text, ntext, and image data types cannot be used in an ORDER BY clause.
  • If you add one of these data type fields to the Sorting and Grouping dialog box of a report and then preview the report, you receive the following error message:
    Can't sort on one or more fields specified in 'Order By' property or sorting/grouping dialog.

CAUSE

Sorting the data types text, ntext, or image is not supported by Access 2002.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Start Microsoft Access.
  2. On the Help menu, click Sample databases, and then click Northwind Sample Access Project.
  3. In the Database window, click Queries under Objects, and then click New.
  4. In the New Query dialog box, click Design View, and then click OK.
  5. In the Add Table dialog box, click the Employees table, click Add, and then click Close.
  6. In the Employees table field list, double-click the following fields to add them to the query design grid: FirstName, LastName, and Notes.
  7. Click in the Sort row cell in the Notes field column, click the arrow that appears, and then click Ascending.
  8. On the Query menu, click Run.
  9. Click Yes when you are prompted to save the query, and save the query as View1.

    Note that you receive the error message:
    The text, ntext, and image data types cannot be used in an ORDER BY clause.

Modification Type:MajorLast Reviewed:9/25/2003
Keywords:kberrmsg kbprb KB295261