Getting Started Guide

Figure 217 is a record with data inserted in its fields.
Figure 217: Sample record of the Vacation form and subform
Creating queries
Queries are used to get specific information from a database. Query results are
special tables within the database.
To demonstrate the use of queries, we will use two different methods:
Using our CD-Collection table, we will create a list of albums by a particular
artist. We will do this using the Wizard.
The information we might want from the Fuel table includes what our fuel
economy is. We will do this using the Design View. (Queries that require
calculations are best created with the Design view.)
Using the Wizard to create a query
Queries created by the wizard provide a list or lists of information based upon what
one wants to know. It is possible to obtain a single answer or multiple answers,
depending upon the circumstances.
In the main database window (Figure 175), click the Queries icon in the Databases
section, then in the Tasks section, click Use Wizard to Create Query. The Query
Wizard window opens (Figure 218). The information we want is what albums are by a
certain musical group or individual (the album’s author). We can include when each
album was bought.
Note
When working with a query, more than one table can be used. Since
different tables may contain the same field names, the format for naming
fields in a query is Table name.field name, with a period (.) between the
table name and the field name. For example, The Lunch field of the
Vacation table used in a query has the name Vacation.Lunch.
Chapter 8 Getting Started with Base 237