When you run a new query, the query output appears in no particular order. Generally, however, you want to order query output. You can do this by using the Sort row of the query design grid.
To order the results of a query, follow these steps:
In Design view, click within the query design grid in the Sort cell of the column you want to sort (see Figure 10.6).
Use the drop-down combo box to select an ascending or descending sort. Ascending or Descending appears in the sort cell for the field, as appropriate.
You might often want to sort query output by more than one field. The columns you want to sort must be placed in order, from left to right, on the query design grid, with the column you want to act as the primary sort on the far left and the secondary, tertiary, and any additional sorts following to the right. If you want the columns to appear in a different order in the query output, you must move them manually in Datasheet view after you run the query.
To sort query results in ascending order by the ContactTitle field, follow these steps:
In Design view, click the Sort row of the query design grid for the ContactTitle field.
From the Sort drop-down combo box, select Ascending.
Run the query and view the results. The records should now be ordered based on the ContactTitle field.
If you want to return to Design view of the query, click View on the toolbar.
Sort the query output by the Country field and, within individual country groupings, by the ContactTitle field. Because sorting always occurs from left to right, you must place the Country field before the ContactTitle field. Select the Country field from the query design grid by clicking the thin gray button above the Country column.
After you have selected the Country field, move the mouse back to the thin gray button and click and drag to the left of the ContactTitle field. A thick gray line should appear to the left of the ContactTitle field.
Release the mouse button.
Change the sort order of the Country field to Ascending.
Run the query. The records should be in order by country and, within the country grouping, by contact title.