Learn Access Now! Chapter 20 Previous Section in Chapter 21 Next Section in Chapter 21
(This is section 3 of 7 in this chapter)
The database defines four different queries, as shown in Figure 21-7.
The Overall View query defines and sorts the fields in the Collection Report, described in the next section. The report includes the fields shown in Table 21-4. The query sorts first by Group Name, then by Title (of the CD), and then by Track Number.
Field | Table | Sorted | ||
---|---|---|---|---|
Group Name | Groups | Ascending | ||
Disc ID | CD | |||
Title | CD | Ascending | ||
Track Number | Song | Ascending | ||
Song Title | Song | |||
Length | Song |
The Sorted Collection query is the basis for the Music Input form. I defined the query as a filter in the CD Collection table. I then saved the filter as a query. This query simply sorts the information in the table by the Title field. The filter orders the CDs within the form.
The Sorted Groups query is the basis for the Add Groups form. I also defined it as a filter in the Groups table, and then saved it as a query. This query only sorts the table by the Group Name field.
Finally, I used the Sorted Tracks query with the Track List table, which acts as a subform in the Music Input form. This query, which again started as a filter in the Individual Tracks table, sorts tracks by two fields: Disc ID and Track Number.
Learn Access Now! Chapter 20 Previous Section in Chapter 21 Next Section in Chapter 21