Chapter 10 Lesson 2
Dec 31, 2015
Chapter 10Lesson 2
Restricting Data Entry To help ensure accurate data,
rules that check entries against specified values can be applied to a field. A validation rule is applied to a field in
View.
Once a validation rule is applied, field entries are to values that adhere to the rule. If an entry does not make the validation rule, than an dialog box is displayed.
validation
Design
restricted
error
Validation Rules Validation rules for
numeric entries are often formed with one or more operators:
< > <= >= <>
Validation rules can contain operators. Logical operators form a compound expression. Logical operators include:
And - requires an entry to both criteria
Or - requires an entry to match criteria
Not requires an entry match the criteria
relational
Less thanGreater
thanLess than or equal toGreater than or equal toNot equal
to
Logical
match
one
not
Validation Rules Text and Date/Time field entries can be
restricted by using an mask. An input mask controls data is entered and is useful when entries should follow a certain . Create input masks in Design View by clicking the … in the Input Mask box in the
Tab. To add a new input mask, select the List button and complete the Customize Input Mask Wizard.
input
how
format
General
Edit
Customize Input Mask Digits 0 and 9 are two commonly
used placeholders, also called mask characters. A means that a digit must be typed for that place. A means that a digit is optional.
0
9
Table Relationships
In a relational database, two tables are when a field in one table corresponds to a field in another table. Every table in a RDBMS needs to be related to at least other table. The related fields must have the same data , but are not required to have the same .
related
one
type
name
Relationships
To view relationships, click Tools – . To create a relationship, tables to
the Relationship window and then a field from one table to a related field in another table. A database with a field will already have one or more relationships defined because Access automatically defines a relationship between the tables.
To delete a relationship, the line that connects the two tables and the press the
key.
DatabaseRelationship
sadddrag
lookup
click
Delete
Viewing Related Records
Datasheet view includes of related records when relationships have been defined. Click the sign next to a record to expand the subdatasheet. Click the sign to hide the subdatasheet.
subdatasheets
plus
minus
The Select Query A select query is a database object that is used to
retrieve, or “ ”, data that matches specified . To create a select query:
1. Click Create – Design. 2. Select names from the dialog box and then select
to add tables to the Query window. 3. The grid is used to specify fields and criteria.
_____fields into the design grid or -click a field name to add it to the next empty column.
4. Specify criteria by typing the entry that is to be matched in the row.
5. Click a box, click the arrow, and then select a sort order.
6. After defining the select query, click Design- to display the select query datasheet. (To run an existing select query, double-click the query name in the Navigation Pane.
selectcriteria
Querytable
Adddesign
double
CriteriaSort
Run
Drag
Modifying and Deleting a Select Query
Modifications to a query can include adding or removing , changing a
order, or changing the order of in the design grid. Modifications are
made in View. When a new query is very similar to an existing query, modify the existing query and select the Office Button –
to create the new query. Delete a query by selecting its name in the
Pane and then pressing the key.
fieldssort
fieldsDesign
Save As
NavigationDelete