Microsoft Office Tutorials and References
In Depth Information
Access Chapter 3 Maintaining a Database
In some cases, rather than making individual changes to records, you will want to make
mass changes. That is, you will want to add, change, or delete many records in a single
operation. You can do this with action queries. An action query adds, deletes, or changes
data in a table. An update query allows you to make the same change to all records
satisfying some criterion. If you omit the criterion, you will make the same changes to
all records in the table. A delete query allows you to delete all the records satisfying
some criterion. You can add the results of a query to an existing table by using an append
query . You also can add the results to a new table by using a make-table query .
To Use an Update Query
The Client Type ﬁ eld is blank on every record. One approach to entering the information for the ﬁ eld would
be to step through the entire table, assigning each record its appropriate value. If most of the clients have the same
type, a simpler approach is available.
In the JSP Recruiters database, for example, most clients are type MED. Initially, you can set all the values
to MED. To accomplish this quickly and easily, you can use an update query, which is a query that makes the same
change to all the records satisfying a criterion. Later, you can change the type for dental organizations and labs.
The following steps use an update query to change the value in the Client Type ﬁ eld to MED for all the
records. Because all records are to be updated, criteria are not required.
• Create a new query for the
• Click the Update button on the
Design tab, double-click the
Client Type ﬁ eld to select the
ﬁ eld, click the Update To row in
the ﬁ rst column of the design
grid, and then type MED as the
new value (Figure 3–29).
Update To row
added to design grid
Don’t I have to enter a criterion?
If you only want the change to be
made on some of the records, you
would need to enter a criterion to
identify those records. Without a
criterion, the change will be made
on all records, which is what you
want in this update.
ﬁ eld included