Exp19_access_ch03_ml1 – small business loans 1.0
Exp19_Access_Ch03_ML1 – Small Business Loans 1.0
You are the manager of a regional business loan department for the U.S. Small Business Administration office. You have decided to evaluate whether Access could be used in place of the Excel worksheet you are currently using. You will create a table, add some sample customers, and import some recent data from an Excel spreadsheet. You will calculate the payments for the loans that are currently on the books by creating a query using the Pmt function. You will also summarize each loan by the type of loan (M=Mortgage, C=Car, and O=Other).
In Design view, create a new table. Add the first field named CustomerID with AutoNumber Data Type. Add Company as the second field name, and FirstName as the third field name. Accept the default data types.
Save the Table with name as Customers. Click Yes, when prompted for defining Primary Key.
Add the following fields to the Customers table (in this order), accepting the default data type of Short Text:
Verify that CustomerID is the primary field.
Save the table and switch to Datasheet view. Add the following records to the table:
Company FirstName LastName City State Zip
Jones and Co Robert Paterson Greensboro NC 27401
Elements, Inc. Merve Kana Paterson NJ 07505
Godshall Meats, LLC Francisco De La Cruz Beverly Hills CA 90210
Import the spreadsheet using the downloaded Excel file a03_h2_Loans.xlsx into a new table. Choose LoanID as the primary key and accept all other defaults in the Import Wizard.
Open the Loans table in Design view. Change the InterestRate field format to
Percent. Change the field size for the CustomerID field to Long Integer. Save and close the table. Click Yes when prompted that some data may be lost.
Create a relationship between the CustomerID fields in the Customers and Loans tables. Enforce referential integrity. Save and close the Relationships window.
Create a query using the two tables that will calculate the payment amount for each loan. Add the following fields: Company, LoanID, Amount, InterestRate, Term, and LoanClass, in that order. Sort the query by LoanID in ascending order. Save the query as Loan Payments.
Use the Expression Builder to add a calculated field named Payment in the first blank column to calculate the loan payment for each loan using the Pmt function. Insert the appropriate field names in place of the placeholder arguments. Assume the loans have monthly payments (12 payments per year). Ensure the payment displays as a positive number. Run the query.
Switch to Design view and change the format for the Payment calculated field to Currency. Run the query again to verify your change.
In Datasheet view, add a Totals row. Use it to calculate the sum of the Amount column, the average InterestRate, and the average Term. Save and close the query.
Create a copy of Loan Payments. Save the new query as Loan Payments Summary. Open the Loan Payments Summary query in Design view and rearrange the columns as follows:
LoanClass, LoanID, Amount, and InterestRate. Delete columns Company, Term, and Payment.
Group the Loan Payments Summary query by the LoanClass field. Display the number of loans in the LoanID column, the sum in the Amount column, and the average in the InterestRate column. Run the query.
Switch to Design view and display the Property Sheet. For the LoanID field, change the caption to Loans. For the Amount field, change the caption to Total Amount and change the format to Currency. For the InterestRate field, change the caption to Avg Interest Rate and change the format to Percent. Run the query. Save and close the query.
Close all database objects. Close the database and then exit Access. Submit the database as directed.