none
Sort Order Grayed Out RRS feed

  • Question

  • I've created a name and address database in Access and want to sort them by last name. The sort option is grayed out. How can I change that?
    Tuesday, March 14, 2017 5:48 PM

All replies

  • From where are you viewing the data - directly in the table?   If so then you need to be using a query to retrieve and sort and then maybe a form to display.

    Build a little, test a little

    Tuesday, March 14, 2017 6:17 PM
  • What are you trying to sort?  If it's the table's datasheet, then data should never be exposed to a user in raw datasheet view, but only via forms and reports, so ordering the rows in a table's datasheet serves no purpose.  A bound form can be based on a query which orders the rows, e.g.

    SELECT *
    FROM Contacts
    ORDER BY LastName, FirstName;

    FirstName is included in the ORDER BY clause so that people of the same last name are ordered consistently.

    A report, on the other hand, should not be based on a query which orders the rows, as the report will ignore the query's ORDER BY clause.  A report should be ordered by means of its internal sorting and grouping mechanism.

    Ken Sheridan, Stafford, England

    Tuesday, March 14, 2017 6:17 PM
  • Despite the comments that suggest that you shouldn't be showing table datasheets to your users (given that you are posting in the "Access for Developers" forum), it's still odd that you wouldn't be offered the built-in sort options.  Are you talking about having a table open in datasheet view, or about something else?

    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html

    Tuesday, March 14, 2017 9:33 PM