Objective 5. Sort Data in a Query

You can sort the results of a query. Because the results of a query are formatted like a table in Datasheet view, the process for sorting is similar to sorting in a table. Records can be sorted in either ascending or descending order. Data in a query can be sorted either from the Datasheet view or from the Design view.

If you add a sort order to the design of a query, it remains as a permanent part of the query design. If you use the sort buttons in the Datasheet view, it will override the sort order of the query design, and can be saved as part of the query, but will not display in the query design grid.


[Page 986]

Activity 2.8. Sorting Data in a Query

1.

With your 2A Query1 displayed in Design view, under Club Affiliation, click in the Sort row to place the insertion point there and display an arrow. Click the Sort arrow, and then from the displayed list, click Ascending.

The results of the query will be sorted alphabetically by Club Affiliation.

2.

Under Pledge Amount, click to display the Sort arrow, and then click Descending.

In the Query Design view, you can sort on two fields that are not adjacent to each other and you can sort in ascending order on one field and descending order on another field. Recall that you could not sort in this manner directly in a table, nor could you do so using a simple filter.

3.

On the Query Design toolbar, click the Run button , and then compare your screen with Figure 2.16.

Figure 2.16.


Access sorts fields left to right. The records are sorted first in alphabetical order by the Club Affiliation fieldthe leftmost fieldand then within each club, in descending orderfrom the highest to lowest amountby the Pledge Amount fieldthe rightmost field.



[Page 987]

Windows XP

Outlook 2003

Internet Explorer

Computer Concepts

Word 2003

Chapter One. Creating Documents with Microsoft Word 2003

Chapter Two. Formatting and Organizing Text

Chapter Three. Using Graphics and Tables

Chapter Four. Using Special Document Formats, Columns, and Mail Merge

Excel 2003

Chapter One. Creating a Worksheet and Charting Data

Chapter Two. Designing Effective Worksheets

Chapter Three. Using Functions and Data Tables

Access 2003

Chapter One. Getting Started with Access Databases and Tables

Chapter Two. Sort, Filter, and Query a Database

Chapter Three. Forms and Reports

Powerpoint 2003

Chapter One. Getting Started with PowerPoint 2003

Chapter Two. Creating a Presentation

Chapter Three. Formatting a Presentation

Integrated Projects

Chapter One. Using Access Data with Other Office Applications

Chapter Two. Using Tables in Word and Excel

Chapter Three. Using Excel as a Data Source in a Mail Merge

Chapter Four. Linking Data in Office Documents

Chapter Five. Creating Presentation Content from Office Documents



Go! With Microsoft Office 2003 Brief
GO! with Microsoft Office 2003 Brief (2nd Edition)
ISBN: 0131878646
EAN: 2147483647
Year: 2004
Pages: 448

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net