Exp19 Access Ch05 Cap Varmel Studio Toys 1 1
You work as the database manager at Varmel Studio Toys, located in Lansing, Michigan. Varmel Studio Toys has the world’s largest selection of collectible superhero posters and action figures. Your task is to add validation rules, create a form that data entry associates can use to add new items to the inventory, and create a new table to classify items as a poster or action figure. You will also use queries to analyze existing data.
Start Access. Open the file named Exp19_Access_Ch05_Cap_Varmel_Studio_Toys.accdb. Grader has automatically added your last name to the beginning of the filename.
You will save the database file with a new name and create a new table that will be the source for a lookup.
Save the database file as Exp19_Access_Ch05_Cap_Varmel_Studio_Toys_LastFirst.accdb. Use Design view to create a new table. Add ItemTypeID as the first field name, with data type AutoNumber; add ItemTypeDescription as the second field name, with data type Short Text and field size 15.
Ensure ItemTypeID is set as the primary key. Save the table and name it Item Types. Add two records: Action Figure and Poster. Close the table.
You will edit the Inventory table design to validate data. You will make two fields required and add a validation rule to a field. You will also make sure you test the validation to make sure the rules work as intended.
Open the Inventory table in Design view. Set the InventoryQty and ItemTypeID fields to Required.
Establish a validation rule for the InventoryQty field that requires the value to be greater than or equal to zero. Create validation text for the InventoryQty: The value of this field must be 0 or greater. (include the period). Save the table. Switch to Datasheet view. Change the InventoryQty in the first record to -2. The validation text appears. Close the message box, then press Esc to restore the original InventoryQty value. Close the Inventory table.
To help keep data input consistent, you will add input masks to the Phone fields in the Employees table.
Open the Employees table in Design view. Add a phone number input mask for the Phone field, storing with the symbols. Save and close the table.
You will convert the ItemTypeID field in the Inventory table to a lookup field, using the new table you created previously as the source for the values in the lookup field.
Open the Inventory table in Design view. Change the Data Type of the ItemTypeID field to Lookup Wizard. Use the Item Types table for the values in the lookup field, select both fields in the table, accept the default sort, hide the key field from the user, and then accept the default name ItemTypeID. Save the table. Switch to Datasheet view. Change the item type to Poster in the first record and click the second record. If the record updates successfully, change the first record back to Action Figure. Close the table.