Description
Part 1 - Assignment Instructions
Using the model car sample database provided, create queries to demonstrate a variety of simple, single table select query functionality to include selecting more than one field, using the where clause, using alias’, working with dates, sorting and using relational and logical operators.
- Open the sample database.
For this assignment you will use this sample database: IT163_ModelCarSampleDatabase.accdb
- Create the five queries as detailed below. You may create these queries using the query design view or you may manually write the SQL code in the SQL view.
a. Select the Company field from the Customers table.
Save as QueryA. Run the query to see the subset of data produced. Verify that the results are correct.
Reference: Alexander, M., & Kusleika, D. (2019). Access 2019 bible. Wiley.
Chapter 8: “Selecting Data with Queries / Creating a Query / Working with Query Fields / Adding Criteria to Your Queries / Saving a Query”
b. Modify QueryA to sort the output in alphabetical order.
Save as QueryB. Run the query to see the subset of data produced. Verify that the results are correct.
Reference: Alexander, M., & Kusleika, D. (2019). Access 2019 bible. Wiley.
c. Select the Description, Cost and QtyInStock fields from the Products table for all records with category “Trucks.” Sort by cost from lowest to highest cost.
Save as QueryC. Run the query to see the subset of data produced. Verify that the results are correct.
Reference: Alexander, M., & Kusleika, D. (2019). Access 2019 bible. Wiley.
Chapter 8: “Selecting Data with Queries / Creating a Query / Working with Query Fields / Adding Criteria to Your Queries / Saving a Query”
d. Select the OrigCustDate, FirstName, and LastName from the Contacts table for all records with the state of Texas (“TX”) and OrigCustDate of January 1, 2013 or later. Display first and last name together as Customer Name.
Save as QueryD. Run the query to see the subset of data produced. Verify that the results are correct.
Reference: Alexander, M., & Kusleika, D. (2019). Access 2019 bible. Wiley.
Chapter 9: “Using Operators and Expressions in Access / Introducing Operators / Using Operators and Expressions in Queries / Using Multiple Criteria in a Query / Entering Criteria in Multiple Fields”
e. Select the Company, CurrentBalance and State from the Customers table for all records with a current balance greater than zero and a state of New York or Connecticut. Sort by CurrentBalance from highest to smallest value.
Save as QueryE. Run the query to see the subset of data produced. Verify that the results are correct.
- Document your results for submission.
In a Word document, copy each of the questions from above in BOLD. After each question, place the SQL code. After the SQL code, place a screenshot of the successful execution from Access showing the correct results were garnered when you ran each query. Start a new page for each question.
Hint: you can copy your SQL code as plain text from the SQL view. Right-click your query and choose SQL View or use the View option from the ribbon.
Example Query Output:
Assignment Requirements
Submit a single Word document with all of the documentation for each query as described in the assignment instructions.
Part 2 - Assignment Instructions
You will create a form for the Customer table with a subform for the Customer Contacts table so that data can be entered into both tables at the same time. You will also add controls and apply data validation to several fields in the Customer form. You will also apply encryption to password protect your database.
- Open the sample database.
For this assignment you will use this sample database:
IT163_ModelCarSampleDatabase.accdb
- You will apply encryption to your database and use the password “PurdueGlobal.”
For extra help see Optional Resources for Assignment under the Academic Tools, Library link:
Reference:
Encrypt a database by using a password
https://support.microsoft.com/en-us/office/encrypt...
- Create a form with subform for the Customer (main form) and Customer Contacts tables (subform).
Reference:
Alexander, M., & Kusleika, D. (2019). Access 2019 bible. Wiley.
Chapter 19: “Working with Form Controls / Working with Subforms”
- Name the new form with subform CustomerContactSubForm and save it as a new form object in your database.
- You will add validation and controls for the Customer data as follows. Use the validation rule with validation text to ensure a custom error message is displayed when a rule is violated where appropriate:
- Company - Validate that field is not left blank
- Address - Validate that field is not left blank
- City - Validate that field is not left blank
- State - Create a dropdown box control (include at least three states in the list)
- ZipCode – Validate that field is at leave five numeric digits
- Phone - Validate that field is not left blank and add an appropriate input mask
- Fax -Validate that field is not left blank and add an appropriate input mask
- Email - Validate that field is not left blank
- WebSite -Validate that field is not left blank
Note: No validation required for the remaining fields.
Reference:
Alexander, M., & Kusleika, D. (2019). Access 2019 bible. Wiley.
Chapter 19: “Working with Form Controls / The Combo Box and List Box controls”
Ulrich, L. A. & Cook, K. (2019). Access 2019 for dummies. Wiley.
Chapter 7: “Types, Masks, and Triggers”
For extra help see Optional Resources for Assignment under the Academic Tools, Library link:
Restrict Data Input by Using Validation Rules
https://support.microsoft.com/en-us/office/restric...
- Add one new record to the Customer table and one new record to the CustomerContacts table using the form with subform. Use your own last name in the Company field in the Customer table entry and in the Last Name field in the CustomerContacts table entry. The other data can be of your own choosing.
- Save your Microsoft Access database file for submission.
Explanation & Answer
Hello again! 😀 I can't attach the zip file containing my works so far directly here due to size limit. But here's the link. Please download it as soon as you see this since the link will expire after 1 week.https://we.tl/t-BCRjpR894w For Part 1, you just need the docx file...