Exp19_DSP_Access – Business 1.0
You are the assistant director for the Information Technology (IT) department at Healthy Living Motorcycles, Inc. In addition to overseeing hardware and software selection, system maintenance, and employee IT training, you create and maintain databases for the whole organization. The organization uses one central database rather than maintaining several individual ones to reduce data redundancy and errors. You will take the opportunity to create an efficient database to keep track of and manage information regarding the company’s employees, products, and shareholders.
You have an existing database that contains the products sold by the company. However, you need to create a table that will classify each product under a specific category. After the table is created, you import the category data into the new table.
Import the data in the 02a_ProductCategory.xlsx Excel file into a new table. Use the column headings from the Excel file, select the CategoryID field as the primary key, and then save the table as Product Category.
Hint: On the External Data tab, in Import & Link group, click New Data Source.
See next page for Instruction 3
With the Product Category table open in Design view. Ensure the field properties of the Product Category table have been modified as follows:
Description = This field is assigned a 2-letter code
Caption = Category ID
This is a required field
Set Indexed = Yes (No Duplicates)
Caption = Category Name
This is a required field
Set Indexed = Yes (No Duplicates)
Caption = Supplier ID
Description = All Supplier ID must begin with an “S”
Set Indexed = No
Hint: To open the table in Design view, right-click, and then click Design View. Use the Field Properties pane to modify the properties.
View the data in the Product Category table in Datasheet view and adjust column widths so all data is visible.
Save and close the table.
You create relationships among the four tables (Employees, Product Category, Suppliers, and Products) so that you can make the database more efficient.
Create the following relationships and enforce referential integrity:
• Product Category and Suppliers tables using the SupplierID field
• Suppliers and Employees tables using the EmployeeContactID and EmployeeID fields
• Product Category and Products tables using the CategoryID field
Save and close the Relationships window.
Hint: On the Database Tools tab, in the Relationships group, click Relationships.
You need to quickly find the products that were supplied by a foreign country. You will open the Suppliers table and filter the records.
Open the Suppliers table in Datasheet view.
Filter the records for the suppliers who were outside of the United States. You should have 11 records.
Close the table.
Hint: Click the arrow to the right of the S_Country field, and then deselect the USA checkbox.
The director of marketing has requested a list of the suppliers that have a capacity of more than 25,000 square feet for manufacturing and warehouse space.
Create a query using the Suppliers table to display the SupplierID, SupplierName, and Capacity fields for those plants with more than 25,000 square feet. Sort the results by SupplierName in ascending order.
Run the query. Name the query Supplier Size. Save and close the query.
Hint: On the Create tab, in the Queries group, click Query Design. In the Capacity column, enter >25000 as the criteria.
The director of marketing wants a list of the employees who are the main contact with the suppliers. He also wants the addresses of these contact employees so that he can personally send them a letter thanking them for working diligently with these suppliers.
Create a query using the Suppliers and Employees tables.
Display the SupplierName, EmployeeLastName, EmployeeFirstName, E_StreetAddress, E_City, E_State, and E_PostalCode fields. Sort the results by EmployeeLastName, in ascending order.
Run the query. Save the query as Contact Employee Address. Close the query.
The human resources manager would like a list of all employees and the approximate length of time they have worked for the company.
Create a query using the Employees table and include the EmployeeLastName, EmployeeFirstName, and Date_of_Hire fields.
Create an expression in the first blank column of the query that calculates the number of years employees have worked for the company, using the Date_of_Hire field and the current date. Do not adjust for days off. Name the expression Tenure. Format the Tenure field as Fixed with 2 decimal places. Name the query Employee Tenure.
Hint: Enter Tenure: (Date()-[Date_of_Hire])/365 as the last field in the query.
Create a report from the Employee Tenure query. Group by Date_of_Hire by month. Sort ascending by Date_of_Hire. Change the title to Employee Tenure Report. Make sure all fields display appropriately.
Widen the columns to display all text. Save the report with the default name, Employee Tenure, and close it.
Hint: With the query selected, on the Create tab, in the Reports group, click Report. On the Design tab, in the Grouping & Totals group, click Group & Sort.
Your organization is always looking for more suppliers to manufacture products. You create a new form to make it easier to enter new supplier information.
Create a new form based on the Suppliers table using the Form tool. Change the title label control to Enter Supplier Information. Reduce the text box widths to one-half of their original size. Change the form’s control padding to Narrow. Save the form as Enter Supplier Information.
Hint: With the table selected, on the Create tab, in the Forms group, click Form. To change the control padding, on the Arrange tab, in the Position group, click Control Padding.
Switch to Form view. Enter a new supplier record, #15, using the following information:
Supplier ID: S115
Supplier Name: Oakland Supply
Delete the content in Employee Contact ID.
Supplier Contact Last Name: Williams
Supplier Contact Title: Intern
Street Address: 12 Oak Street
Postal Code: 48094
Leave Capacity at 0. Leave the S_Phone, S_Fax, Home Page, and ProductID fields blank.
Sort the form by Supplier Name in ascending order.
Save and close the form.
Hint: To sort the data, click in the SupplierName field and, on the Home tab, in the Sort & Filter group, click Ascending.
The director of marketing would like a report that lists the suppliers who manufacture the various motorcycles. You create a query and the report for him using the Report Wizard.
Create a query and name it Motorcycles by Suppliers. Add the SupplierName, SupplierContactLastName, and Capacity fields from the Suppliers table. Add the ProductName and ProductSize fields from the Products table. Add the Product Category table. Sort in descending order by Capacity, but do not display the field in the query.
Run, save, and close the query.
Hint: To hide the field from the query results, in Design view, in the Capacity column, click to remove the check mark from the Show box.
Create a report based on the Motorcycles by Suppliers query. View the data by Suppliers, and group the data by SupplierName. Sort the data by ProductName, ascending order. Select Landscape Orientation for the report. Use Block layout.
Change the report title to Motorcycles Grouped by Suppliers. Preview the report. Change the column widths so all the data is visible. Ensure the Report Header title control is wide enough so the entire title is visible. Switch to Print Preview and make sure that the report is displayed on one page. Exit Print Preview and close the report.
Hint: On the Create tab, in the Reports group, click Report Wizard.
The director of accounting wants to know the cost of time-and-a-half overtime, over and above the regular payroll, for all hourly employees in the organization. You will create a query to find all the employees who worked overtime and create a report based on the query results.
Create a query using the Employees table to calculate the hourly rate at time and a half for those employees who work more than 40 hours per week. Include the following fields: EmployeeFirstName, EmployeeLastName, Hours, Rate, and E_State. Calculate the weekly overtime costs in a column called Weekly Overtime. Please note: Only the hours worked over 40 hours per week count toward overtime pay. Format the field as Currency with 2 decimal places.
Name and save the query as Weekly Overtime.
Hint: In the Hours column, enter >40 as the criteria. Enter Weekly Overtime: ([Hours]-40)*([Rate]*1.5) as the last field in the query.
Create a report for the Weekly Overtime query. Switch to Layout view and use the SUM function to calculate the total cost of overtime pay to all employees. Apply the Organic theme to the report. Change the report title to Employee Weekly Overtime, format the title in bold. Ensure the Control Margins is set to None.
Preview the report and adjust column widths so that the content appears on one page.
Save the report as Employee Overtime and close the report.
Hint: To calculate the total cost, on the Design tab, in the Grouping & Totals group, click Totals. To change the theme, in the Themes group, click Themes. If the theme is not available on your machine, click Browse for Themes, and then select the downloaded theme file Organic.thmx.