Access 2016 Chapter 2 Using Design View, Data Validation, and Relationships Last Updated: 10/9/18 Page 1
USING MICROSOFT ACCESS 2016 Independent Project 2-5
Independent Project 2-5 Life’s Animal Shelter wants to expand the database created in the Independent Project 1-5 in Chapter 1. To ensure consistency, the starting file is provided for you. In this project, you use Design view to create a second table, edit field properties, integrate data integrity rules, and enter data. You also create a relationship between the two tables and enforce referential integrity constraints. Finally, you add data using the relationship between tables. This project has been modified for use in SIMnet®.
Skills Covered in This Project • Create a table using Design view. • Add fields into a table. • Edit field properties in Design view. • Create an input mask. • Create a validation rule and validation text. • Save a table.
• Enter records. • Create a foreign key. • Create a 1:M relationship between tables. • Enforce referential integrity. • View a table in Datasheet view and expand
related records.
1. Open the LifesAnimalShelter-02 database start file.
2. The file will be renamed automatically to include your name. Change the project file name if
directed to do so by your instructor.
3. Enable content in the security warning.
4. Create a new table using Table Design.
a. Add the following fields into the table and set field properties:
b.
c.
d.
e.
f.
g.
h.
i.
j. Set OwnerID as the primary key.
k. Save the table as Owners.
5. Create an input mask for the Phone field.
a. Select the Phone field.
b. Use the Phone Number Input Mask.
c. Don’t make any changes to the mask or placeholder character and select the Without the
symbols in the mask, like this radio button.
Step 1: Download start file
Access 2016 Chapter 2 Using Design View, Data Validation, and Relationships Last Updated: 10/9/18 Page 2
USING MICROSOFT ACCESS 2016 Independent Project 2-5
d. Finish the Input Mask Wizard.
e. Save the table.
6. Create and test a field validation rule.
a. Select the OwnerID field.
b. Type Like "####" in the Validation
Rule.
c. Type You must enter a 4-digit
Owner ID as Validation Text.
d. Save the table and switch to
Datasheet view.
e. Test the rule by typing 11 in the first
row of the OwnerID column.
f. Move to the OwnerLastName
field. The message box should
display the validation text message (Figure 2-92) since the OwnerID is not four digits long.
g. Delete the contents and type 1111 into the OwnerID field.
h. Verify that you successfully move to the OwnerLastName field since 1111 meets the
validation rule criteria.
i. Delete this test data record.
7. Enter the following records into the Owners table. Life’s Animal Shelter doesn’t have any data
about the owners stored electronically so you are unable to import any data.
a.
b.
c.
d.
e.
8. Save and close the table.
9. Determine the foreign key field. Currently there is not a field in common across the Owners and
Pets tables. There is a one-to-many relationship between the two tables since an owner could
adopt many pets, but each pet is only adopted by one owner. The foreign key comes by taking
the primary key field from the 1 table and adding it in as an additional field in the M table.
a. Open the Pets table in Design view.
b. Add the foreign key field below the Details field using the following information:
c. Save and close the Pets table.
Access 2016 Chapter 2 Using Design View, Data Validation, and Relationships Last Updated: 10/9/18 Page 3
USING MICROSOFT ACCESS 2016 Independent Project 2-5
10. Create a one-to-many relationship between the Owners and Pets tables.
a. Open the Relationships window and add the two tables.
b. Enlarge the table objects, if needed, to see all of the fields.
c. Drag the OwnerID field from the Owners table on top of the FKOwnerID field in the Pets table.
Release the pointer. The Edit Relationships dialog box displays.
d. Select the choices to Enforce Referential Integrity and Cascade Update Related Fields.
e. Leave the Cascade Delete Related Records check box not selected. The shelter does not
want to delete pet records when it deletes information about an owner.
f. Create the relationship.
g. Save the changes and close the Relationships window.
11. Enter the following data into the specified records in the Pets table to reflect which pets have
been adopted:
a. Open the Pets table in Datasheet view.
b. Type 0100 in the FKOwnerID field for PetID 1.
c. Type 0103 in the FKOwnerID field for PetID 3.
d. Type 0100 in the FKOwnerID field for PetID 12.
e. Type 0104 in the FKOwnerID field for PetID 14.
f. Close the Pets table.
12. View the related data records in the Owners table.
a. Open the Owners table in Datasheet view.
b. Click the plus sign to the left of the OwnerID field for Albert Smith, OwnerID 0100. You should
see the two pets adopted by Albert.
c. Close the Owners table.
13. Close the database.
14. Upload and save your project file.
15. Submit project for grading.
Step 2 Upload & Save
Step 3 Grade my Project
Applied Sciences
Architecture and Design
Biology
Business & Finance
Chemistry
Computer Science
Geography
Geology
Education
Engineering
English
Environmental science
Spanish
Government
History
Human Resource Management
Information Systems
Law
Literature
Mathematics
Nursing
Physics
Political Science
Psychology
Reading
Science
Social Science
Home
Blog
Archive
Contact
google+twitterfacebook
Copyright © 2019 HomeworkMarket.com