Sorting Collections

When you retrieve a collection of records, you often sort them according to the contents of one field. You can sort based on the contents of a column in a grid, or on the value of information displayed in a field

To sort a collection based on the contents of a grid column, double-click the column heading for the column. To toggle the sort between ascending order and descending order, repeat this action.

To sort a collection based on a field value:

  1. In an open a form, display the collection you want to sort.
  2. Click in the field on which you want to sort.
  3. Select Edit > Sort Collection.
  4. By default, records are sorted on the field in the primary collection that currently has focus. If you are not sorting the primary collection, select a collection and field:
    • From the Collection list, select the name of the collection you want to sort. If you do not know the name of the collection, to see the name of the current collection, return to the form and click Help > About This Form.
    • In the By Property box, click the name of the field on which you want to sort.
  5. By default, records are sorted in ascending order, regardless of capitalization. To sort by descending order, select Descending.
  6. Optionally, select Case-sensitive to take into account capitalization when sorting.
  7. Click OK.