CA101 Access Lab – Part 1 Creating an Auto Repair Shop Business Database Purpose: To demonstrate the ability to create a database, use form view, and create a report. Problem: An auto repair shop needs to maintain information on its jobs and customers. The shop specializes in repair jobs for local car dealers. The database will consists of two tables. The Jobs table contains data on jobs the repair shop either has started or has completed for each customer. The Customer table contains pertinent data about the auto repair shop’s customers. Instructions: The structure for the Customer table is shown in Table A–1 and the data is shown in Table A–2. The structure for the Jobs table is shown in Table A–3 and the data is shown in Table A–4. 1. Save this word document on desktop as Web Page (*.htm or *.html) document. 2. Create a new database and name it, Repair Shop. 3. Now “Import” data from the above saved html document by using “Get External Data” command from the “File” menu. 4. Click on Desktop, then Choose the File Type As “HTML documents”, Select the document, and click “Import”. 5. Click Show HTML Tables 6. Choose the table that has data with the following headings “Customer ID”, “Customer Name”, “Contact Person” etc. 7. Click Next, Click “First Row Contains Column Headings”, Click Next, Click “In a New Table”, Click Next, Click Next, 8. Click “Choose my own Primary Key”, make sure its Customer ID, Click Next 9. Type “Customer” as Table name. 10. Open “Customer” table in Design View, and change Data Type, Field Size, and Description according to Table A – 1. 11. Check if access program created any error table if so then fix the problems. 12. Repeat Step 4 to 9 for “Job” Table, make sure “Job ID” is the primary key, and table name is “Jobs” 13. Open “Jobs” table in Design View, and change Data Type, Field Size, and Description according to Table A – 3. 14. Check if access program created any error table if so then fix the problems. 15. Create a relationship between two tables, on Customer.Customer ID and Jobs.Customer ID by using Tools Relationship…. (Drag and drop customer id from Jobs table to Customer table or visa versa.) a. Checked Enforce Referential Integrity. b. Checked cascade update c. Checked delete update 16. Create a form for the Customer table using wizard. 17. Open the customer form in Design View. 18. Drag the Detail downward to make some space for sub form. Access Lab – Part 1 CA101 Creating an Auto Repair Shop Business Database 19. From Toolbox toolbar drag the sub form control at the bottom of Customer form. 20. Choose “Use existing Tables and Queries”, 21. Click Next, then select the Jobs table and choose all fields such as JobID, CustomerID, JobDescription, JobStatus, CompletionDate, and Quote. 22. Click Next, then select “Choose from a list” 23. Click Next and then Click Finish. 24. Click View and then Form View. 25. Now two tables are linked on a form, based on Customer ID. It will display all jobs of each Customer together. 26. Check all the customers and their related job. Change customer name to your friends name, similarly change Email to your friend email, Add more customers and their jobs, or delete some of the bad customers etc. 27. Now use the same (form) technique to create report and sub report. Structure of Field Name Customer ID Customer Name Contact Person Telephone Email the Customer table Data Type Text Text Text Text Text Field Size 3 25 20 8 50 Primary Key? Yes Description Customer number (primary key) Customer/Dealer name Contact person Contact telephone number Customer Email Table A–1 Data for the Customer table Customer ID JMS KSI ROM TRW JTC NQR Customer_Name Jacob’s Motor Sales Keith’s Sports Cars, Inc. Randy’s Old Makes Trevor’s Rolling Wheels Jack’s Timeless Classics Nick’s Quick Rides Contact Person Jacob Daniels Keith Moorehouse Randy Petersen Trevor Craig Jack Johnson Nick Stone Table A–2 Telephone 555-3451 555-6639 555-7877 555-2258 555-9111 555-8890 Email Ur_id@hotmail.com Frnd_id@yahoo.com Frnd_id@yahoo.com Frnd_id@gmail.com Frnd_id@msn.com Frnd_id@kfupm.edu.sa Access Lab – Part 1 CA101 Creating an Auto Repair Shop Business Database Structure of the Jobs table Field Name Job ID Customer ID Job Description Job Status Completion Date Quote Data Type Text Text Text Text Date/Time Currency Field Size 4 3 25 1 Primary Key? Yes Description Job number (primary key) Customer ID number General job description Status of complete (C) or incomplete (I) Date job is to be completed Customer’s cost for job Table A–3 Data for the Jobs table Job ID Customer ID Job Description M345 M653 B423 B746 M236 M965 B474 B559 B365 M547 B147 B338 M482 B628 B553 M182 B527 M982 M522 B932 JMS KSI KSI ROM TRW JTC ROM JMS JTC NQR NQR JMS KSI JTC ROM JTC JMS NQR JTC JMS Grill Work – 67 Chevy Rebuild Tran – 73 Merc Bumper Repair – 55 Nash Valve Job – 68 Falcon Brake Drums – 69 Linc Re-paint – 39 Ford Door Panels – 71 Falcon Heater Repair – 63 Ford Windshield Repair – 66 PU Floor Boards – 71 Chevy Muffler – 75 LTD Tie-rods – 78 GTO Shocks – 78 Pontiac Gas Tank – 75 Pinto Trunk Deck – 65 Galaxy Overhaul – 83 LTD Brake Cyl. – 80 Fairlane Muffler – 72 Corvette Tune-up – 71 Lincoln Manifold – 37 P-Arrow Table A–4 Job Completion Quote Status Date I 6/30/2005 C 5/12/2005 I 9/21/2005 C 4/15/2005 I 6/15/2005 C 3/1/2005 C 3/27/2005 I 5/6/2005 I 7/22/2005 I 9/30/2005 I 6/26/2005 C 4/17/2005 C 7/21/2005 I 8/16/2005 C 9/4/2005 C 8/12/2005 I 9/21/2005 I 10/12/2005 C 4/30/2005 I 10/16/2005 2200 2685 400 700 2400 1057 300 460 400 2500 250 510 660 420 1080 990 890 580 490 385