8
In this activity, we are going to create a query for a computer company. The query will calculate the total and average expenses of the salesmen for each department. 1.Start Microsoft Access and open the database file ch11_01.mdb in the hard disk. 2.Click ‘Queries’ in the ‘Objects’ column and then click . 3.Double-click ‘Simple Query Wizard’ in the ‘New Query’ dialogue box. New Activity 4 Creating a query for a computer company

In this activity, we are going to create a query for a computer company. The query will calculate the total and average expenses of the salesmen for each

Embed Size (px)

Citation preview

Page 1: In this activity, we are going to create a query for a computer company. The query will calculate the total and average expenses of the salesmen for each

In this activity, we are going to create a query for a computer company. The query will calculate the total and average expenses of the salesmen for each department.

1. Start Microsoft Access and open the database file ch11_01.mdb in the hard disk.

2. Click ‘Queries’ in the ‘Objects’ column and then click .

3. Double-click ‘Simple Query Wizard’ in the ‘New Query’ dialogue box.

New

Activity 4

Creating a query for a computer company

Page 2: In this activity, we are going to create a query for a computer company. The query will calculate the total and average expenses of the salesmen for each

4. In the Simple Query Wizard window, select the table ‘Salesmen Expenses’ from the ‘Tables/Queries’ pull down menu.

Activity 4

Creating a query for a computer company

Page 3: In this activity, we are going to create a query for a computer company. The query will calculate the total and average expenses of the salesmen for each

5. Click to move all the fields except ‘Salesman’ from the list box ‘Available Fields’ to that of ‘Selected Fields’. Click when ready.

Activity 4

Creating a query for a computer company

Next

Page 4: In this activity, we are going to create a query for a computer company. The query will calculate the total and average expenses of the salesmen for each

6. Select the ‘Summary’ option to create a summary query that shows the total and average expenses. Then, click .

Activity 4

Creating a query for a computer company

Summary Options

Page 5: In this activity, we are going to create a query for a computer company. The query will calculate the total and average expenses of the salesmen for each

7. In the ‘Summary Options’ window, click the check boxes to include the total (Sum) and average (Avg) expenses as shown below. Click to return to the previous screen in Step 6.

OK

Only numeric fields can be chosen for calculations.

Activity 4

Creating a query for a computer company

Page 6: In this activity, we are going to create a query for a computer company. The query will calculate the total and average expenses of the salesmen for each

8. Click .

9. Enter ‘Statistics Query’ as the query titleand then click .

Activity 4

Creating a query for a computer companyNext

Finish

Page 7: In this activity, we are going to create a query for a computer company. The query will calculate the total and average expenses of the salesmen for each

(a) Which department has the highest total expense on transportation? ____________________________________

(b) Create a new query with the Simple Query Wizard to calculate the total expense on meal. Total expense on meal is $________.

10. Close the query and database file. Then, exit Microsoft Access.

Activity 4

Creating a query for a computer company

CPU

5513

Page 8: In this activity, we are going to create a query for a computer company. The query will calculate the total and average expenses of the salesmen for each

(a) Which department has the highest total expense on transportation? ____________________________________

(b) Create a new query with the Simple Query Wizard to calculate the total expense on meal. Total expense on meal is $________.

10. Close the query and database file. Then, exit Microsoft Access.

Activity 4

Creating a query for a computer company

CPU

5513