Microsoft KB Archive/295261

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

Article ID: 295261

Article Last Modified on 9/25/2003

-

APPLIES TO


 * Microsoft Access 2002 Standard Edition

-



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.



Steps to Reproduce the Behavior
 Start Microsoft Access.</li> On the Help menu, click Sample databases, and then click Northwind Sample Access Project.</li> In the Database window, click Queries under Objects, and then click New.</li> In the New Query dialog box, click Design View, and then click OK.</li> In the Add Table dialog box, click the Employees table, click Add, and then click Close.</li> In the Employees table field list, double-click the following fields to add them to the query design grid: FirstName, LastName, and Notes.</li> Click in the Sort row cell in the Notes field column, click the arrow that appears, and then click Ascending.</li> On the Query menu, click Run.</li> 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.

</li></ol>

Additional query words: prb

Keywords: kberrmsg kbprb KB295261

-

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

© Microsoft Corporation. All rights reserved.