0% found this document useful (0 votes)
80 views

Lab Activity

This document provides instructions for creating several reports in Microsoft Access: a sales receipt report, a sales by month report shown as a pivot chart, and a sales by customer report. It includes steps to build the necessary queries and set properties of the reports like grouping, sorting, formatting and adding buttons or charts.

Uploaded by

Ana Fiena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views

Lab Activity

This document provides instructions for creating several reports in Microsoft Access: a sales receipt report, a sales by month report shown as a pivot chart, and a sales by customer report. It includes steps to build the necessary queries and set properties of the reports like grouping, sorting, formatting and adding buttons or charts.

Uploaded by

Ana Fiena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

LAB ACTIVITY MS ACCESS SESSION 5 – Creating Reports

LAB ACTIVITY
MS ACCESS*
SESSION 6

Creating Reports

Table of Contents
6.1. Producing Sales Receipt ..................................................................................................................... 2

6.2. Producing Sale by Month Report ....................................................................................................... 7

6.3. Producing Sale by Customer Report ................................................................................................ 11

6.4. Producing Sale by Product Report ................................................................................................... 12

6.5. Creating Menu Form ........................................................................................................................ 13

In this guideline, you can see the name for tables, field of tables,
forms, queries, reports, macros and controls end with 000. REPLACE
the 000 with last three digit of your MATRIC NUMBER
* Best version Ms Access 2010

Page 1 of 15
LAB ACTIVITY MS ACCESS SESSION 5 – Creating Reports

6.1. Producing Sales Receipt


6.1.1. Creating report can be start from creating query that has all information needed to
show report. In this case we want information about the sale id, sale date, customer
name, list of products along with their quantities and prices. The sale id should be
referred to sale id in the form. The setting of the query is as below.

Field

Total:[item_quantity_000]*
customer_name_000

product_name_000

item_quantity_000

[item_price_000]
item_price_000
sales_date_000
sale_id_000

Table
sale_items_000

sale_items_000

sale_items_000
customers_000

products_000
sales_000

Sort Ascending

Show Yes YES YES YES YES YES


Criteria Refer result
from
Expression
Builder below

Expression Elements Expression Categories Result


Tutorial.accd  sales_id_000 Forms![sales_form_000]![sales_id_000]
Forms All Forms  (double click)

sales_form_000

6.1.2. Save the query as qry_sale_receipt_000.

6.1.3. While the query is open, click Report in Create tab.

Page 2 of 15
LAB ACTIVITY MS ACCESS SESSION 5 – Creating Reports

6.1.4. As you can see, sale id, sale date and customer name is the same for the
five items, so we just want to have one only. This can be done by
locating the three type of information in Page Header in Design View.

6.1.5. For now, you can delete sale id, sale date and customer name in Detail
section.

6.1.6. Next, make the page header wider by draging down the Detail section.
Click Add Existing Fields icon. You can see the available field here. Drag
sale id, sale date and customer name to Page Header section.

Page 3 of 15
LAB ACTIVITY MS ACCESS SESSION 5 – Creating Reports

6.1.7. Delete the total for item price and make total for Total field. Select Total control in
Detail section, right click. Select Total and Sum.

6.1.8. In order to make numbering for sale item, create another Text Box. Put the name as
numbering_000 at Other tab in Property Sheet. Select the text box, in Property Sheet
in Data tab, put =1 in Control Source and Over All for Running Sum option as shown
below.

Page 4 of 15
LAB ACTIVITY MS ACCESS SESSION 5 – Creating Reports

6.1.9. The initial result may displayed as below

6.1.10. You can change the logo, make the Text Boxes border to transparent. Change the font
and font color, date format and grand Total format to Currency.

Page 5 of 15
LAB ACTIVITY MS ACCESS SESSION 5 – Creating Reports

6.1.11. Finally, we want to create a button to show this report. The setting is as
below.

Categories Report Operation


Action Preview Report
Report Name sale_receipt_000
Display Text: Sale Receipt
Name btn_sale_receipt_000
6.1.12. Try to test the form and make sure it works.

Page 6 of 15
LAB ACTIVITY MS ACCESS SESSION 5 – Creating Reports

6.2. Producing Sale by Month Report

6.2.1. Create a query as below.

Field sales_date_000 item_price_000

Table sales_000 sale_items_000

Sort

Show YES YES

6.2.2. Save as report_sale_by_month_000.

6.2.3. In Home tab, click PivotChart View.

6.2.4. Make sure the Drop Zone and Field List is selected.

6.2.5. In Chart Field List, select item_price_000. In bottom combo box choose Data Area and
click Add to button.

Page 7 of 15
LAB ACTIVITY MS ACCESS SESSION 5 – Creating Reports

6.2.6. Expend the sales_date_000 By Month, select Months. In bottom combo


box, select Category Area and click Add to button.

6.2.7. Click Property Sheet. In General tab, make sure the Select option is Chart Workplace.

In Add category, click icon

Page 8 of 15
LAB ACTIVITY MS ACCESS SESSION 5 – Creating Reports

6.2.8. Click Type tab to change to the type of the chart.

6.2.9. In the same Properties box, Select option in General tab, select Title.

6.2.10. Click Format tab, and rename the caption and change other format.

6.2.11. You can unselect Drop Zones to have a better view.

Page 9 of 15
LAB ACTIVITY MS ACCESS SESSION 5 – Creating Reports

Page 10 of 15
LAB ACTIVITY MS ACCESS SESSION 5 – Creating Reports

6.3. Producing Sale by Customer Report


6.3.1. This report is similar to sales by month report (Refer Previous Tutorial – 6.2)

6.3.2. The different is the query which is just like below. Refer Tutorial 5.2 on how to make query that
has total.

6.3.3. Make sure sale_000 is added to link between the customer and sale items table.

Field customer_name_000 item_price_000

Table customers_000 sale_items_000

Total Group By Sum

Sort Descending

Show YES YES

6.3.4. Save the query as report_sale_by_customer_000.

6.3.5. Add SumOf item_price_000 in Data Area and customer_name_000 in Category Area.

6.3.6. Put a title as Sale by Customers

Page 11 of 15
LAB ACTIVITY MS ACCESS SESSION 5 – Creating Reports

6.4. Producing Sale by Product Report


6.4.1. This report is similar to sales by customer report except the query.

6.4.2. The different is the query which is just like below.

Field product_name_000 item_price_000

Table products_000 sale_items_000

Total Group By Sum

Sort Descending

Show YES YES

6.4.3. Save the query as report_sale_by_products_000.

6.4.4. Add SumOf item_price_000 in Data Area and product_name_000 in Category Area.

6.4.5. Put a title as Sale by Products.

Page 12 of 15
LAB ACTIVITY MS ACCESS SESSION 5 – Creating Reports

6.5. Creating Menu Form


6.5.1. Create a blank form. In Create tab, click Blank Form

6.5.2. Set some basic properties as you wish and save as menu_000.

6.5.3. Firstly, we want a button that opens sale_form_000 form. Set the setting of the
button as below.

Categories Form Operations


Action Open Form
Form Name sale_form_000
Information Display Open the form and show
all the records
Display Text: SALE RECORD
Name open_sale_record_000
6.5.4. Test the button and make sure it works.

6.5.5. Next, create another button to open sale by month report as setting
below.

Categories Miscellaneous
Action Run Query
Query Name report_sale_by_month_000
Display Text: SALES BY MONTH
Name sales_by_month_000

6.5.6. We need to edit the macro in the button.

6.5.7. Change the View to PivotChart


Page 13 of 15
LAB ACTIVITY MS ACCESS SESSION 5 – Creating Reports

6.5.8. Test the button and make sure it works.

6.5.9. By the similar setting, create another two buttons to open sale by customer and sale
by product report.

Categories Miscellaneous
Action Run Query
Query Name report_sale_by_customer_000
Display Text: SALES OF CUSTOMERS

Name sales_by_customers_000

Categories Miscellaneous
Action Run Query
Query Name report_sale_by_products_000
Display Text: SALES BY

Name PRODUCTS
sales_by_products_000

Page 14 of 15
LAB ACTIVITY MS ACCESS SESSION 5 – Creating Reports

6.5.10. Now, we want to make this menu form as default form opened when we open this
file.

6.5.11. In File tab, click Options.

6.5.12. In Current Database page, select menu_000 in Display Form option.

6.5.13. Close the file and reopen it. Make sure the menu form is open by default.

THIS IS THE END OF ALL TUTORIALS. CONGRATULATION!

Page 15 of 15

You might also like