Datasheet

they often include the date, reports provide a permanent record of the
information.
It’s not
strictly true that forms can display only a single record at a time.
As you find out in later chapters (such as Chapter 10), some forms that
are based on multiple tables can include a section called a
subform that
can display multiple records from the second table in Datasheet view.
Both forms and reports depend on a table (or a query, as discussed
in the next section) to provide the information that they display.
You
can’t create a form or a report unless you first have a table or query to
use as a basis for the form or report. One important result of this fact
is that Access forms and reports can exist only within an Access data-
base file.
Access forms and reports are usually tied to an Access table (but they
can also get their data from a query). When you create a form or a
report, the name of the table is saved along with the form or report. If
you (or someone else) delete the table, you can’t open the form or
report associated with it unless you have associated the form or report
with a different table.
Understanding the Value of Queries
I know, the title of this book doesn’t mention queries, but queries are a funda-
mental and vital part of making your Access forms and reports really useful.
Queries are nothing to be afraid of, and they might end up being your favorite
part of Access!
Introducing the query concept
So just what is a query? In its simplest form, a query acts like a filter; you can
use a query to choose specific information that you want to see from a table. A
more complex query takes you well beyond the scope of a filter (see Chapter 5).
Figure 1-5 shows an example of a basic query, known as a
select query.
When you run a query, Access displays the results in Datasheet view, as
shown in Figure 1-6. In this example, I set the criteria value in the State field
to Nevada, and this is reflected in the results shown in Figure 1-6.
The query results in Figure 1-6 are shown in a Datasheet view that looks
almost identical to the Datasheet view of an ordinary Access table, with only
the title bar as a tip-off that this is really a query. You can, indeed, use a
query as a substitute for a table as the basis for a form or a report . . . or for
another query!
18
Part I: Accessing Both Ends: Getting Data In and Info Out
05_046593 ch01.qxp 11/27/06 1:23 PM Page 18