Microsoft Office Tutorials and References
In Depth Information
Validation Rules AC 165
T O U SE AN A PPEND Q UERY
An append query adds a group of records from one table to the end of another
table. For example, suppose that JSP Recruiters acquires some new clients and a database
containing a table with those clients. To avoid entering all this information manually, you
can append it to the Client table in the JSP Recruiters database using the append query.
To create an append query, you would use the following steps.
1. Create a query for the table containing the records to append.
2. In Design view, indicate the fi elds to include, and then enter any necessary criteria.
3. View the query results to be sure you have specifi ed the correct data, and then return
to Design view.
4. Click the Append button on the Design tab.
5. When Access displays the Append dialog box, specify the name of the table to receive the
new records and its location. Run the query by clicking the Run button on the Design tab.
6. When Access indicates the number of records to be appended, click the Yes button.
T O U SE A M AKE -T ABLE Q UERY
In some cases, you might want to add the records from an existing table to a new
table, that is, a table that has not yet been created. If so, use a make-table query to add
the records to a new table. Access will create this table as part of the process and add the
records to it. To create a make-table query, you would use the following steps.
1. Create a query for the table containing the records to add.
2. In Design view, indicate the fi elds to include, and then enter any necessary criteria.
3. View the query results to be sure you have specifi ed the correct data, and then return
to Design view.
4. Click the Make Table button on the Design tab.
5. When Access displays the Make Table dialog box, specify the name of the table to
receive the new records and its location. Run the query by clicking the Run button on
the Design tab.
6. When Access indicates the number of records to be inserted, click the Yes button.
Validation Rules
Using Wildcards in
Validation Rules
You can include wildcards
in validation rules. For
example, if you enter the
expression, like C?, in the
Validation Rule box for
the State fi eld, the only
valid entries for the fi eld
will be CA, CO, and CT.
You now have created, loaded, queried, and updated a database. Nothing you have done
so far, however, makes sure that users enter only valid data. To ensure the entry of valid
data, you create validation rules ; that is, rules that a user must follow when entering the
data. As you will see, Access will prevent users from entering data that does not follow the
rules. The steps also specify validation text , which is the message that will appear if a user
violates the validation rule.
Validation rules can indicate a required fi eld , a fi eld in which the user actually
must enter data. For example, by making the Client Name fi eld a required fi eld, a user
actually must enter a name (that is, the fi eld cannot be blank). Validation rules can make
sure a user’s entry lies within a certain range of values ; for example, that the values in the
Amount Paid fi eld are between $0.00 and $100,000.00. They can specify a default value ;
that is, a value that Access will display on the screen in a particular fi eld before the user
begins adding a record. To make data entry of client numbers more convenient, you also
can have lowercase letters appear automatically as uppercase letters. Finally, validation
rules can specify a collection of acceptable values; for example, that the only legitimate
entries for the Client Type fi eld are MED, DNT, and LAB.
Search JabSto ::




Custom Search