Learning About Relational Database By using Microsoft Access 2010

Similar documents
School of Business. BUACC5937: Information Systems Design and Development for Accountants. Mudusu Calling Cards System (MCCS)

Database Tables Lookup Wizard Relationships Forms Subforms Queries Reports

SEE GRADING CRITERIA AT THE BOTTOM. Database Tables Lookup Wizard Relationships Forms Queries Reports

Using Microsoft Access

When you pass Exam : Access 2010, you complete the requirements for the Microsoft Office Specialist (MOS) - Access 2010 certification.

Simple Invoicing Desktop Database with MS Access 2013/2016. David W. Gerbing School of Business Administration Portland State University

Access Review. 4. Save the table by clicking the Save icon in the Quick Access Toolbar or by pulling

Objective 1: Familiarize yourself with basic database terms and definitions. Objective 2: Familiarize yourself with the Access environment.

Access Intermediate

Using Microsoft Excel

Microsoft Office. Access Tutorial Part 2

Using Microsoft Access

Access Intermediate

Introduction to Microsoft Access 2016

EXCEL BASICS: MICROSOFT OFFICE 2007

Spreadsheet definition: Starting a New Excel Worksheet: Navigating Through an Excel Worksheet

Designer TM for Microsoft Access

Creating Reports in Access 2007 Table of Contents GUIDE TO DESIGNING REPORTS... 3 DECIDE HOW TO LAY OUT YOUR REPORT... 3 MAKE A SKETCH OF YOUR

Excel 2016: Part 2 Functions/Formulas/Charts

EXCEL BASICS: MICROSOFT OFFICE 2010

a. Establish a one-to-many relationship between the Items and Inventory tables.

Tutorial 2. Building a Database and Defining Table Relationships

Excel Shortcuts Increasing YOUR Productivity

Level 6 Relational Database Unit 3 Relational Database Development Environment National Council for Vocational Awards C30147 RELATIONAL DATABASE

Open. Select the database and click. Print. Set printing options using the dropdown menus, then click the

ICT IGCSE Databases (Access)

ICT IGCSE Databases (Access) A database is a collection of data or information stored in a logical format.

Access: Printing Data with Reports

DEVELOPING DATABASE APPLICATIONS (INTERMEDIATE MICROSOFT ACCESS, X405.5)

Office of Instructional Technology

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Excel Intermediate

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013

Excel 2016: Part 1. Updated January 2017 Copy cost: $1.50

Microsoft Access 2010

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Microsoft Excel Microsoft Excel

MS Office 2016 Excel Pivot Tables - notes

Tutorial 1: Introduction to Microsoft (MS) Access. Microsoft Access: A Relational Database Application

Getting started with Ms Access Getting Started. Primary Key Composite Key Foreign Key

Copyright 2018 MakeUseOf. All Rights Reserved.

Application of Skills: Microsoft Excel 2013 Tutorial

Excel. Spreadsheet functions

Microsoft Office Illustrated Introductory, Building and Using Queries

Math 1525 Excel Lab 1 Introduction to Excel Spring, 2001

A. Open Access and create a new database named Lab7_yourlastname.accdb.

Excel 2013 Workshop. Prepared by

NCSS 2004/2007 Orientation

Table of Contents COURSE OVERVIEW... 5

Access: You will have to

Excel 2007 New Features Table of Contents

Data Should Not be a Four Letter Word Microsoft Excel QUICK TOUR

John W. Jacobs Technology Center 450 Exton Square Parkway Exton, PA Introduction to

Objective: Class Activities

Englische Access 2016-Trainingsskripte für IT Seminare und EDV Schulungen als Word-Dokument zum Ausdrucken und fürs Intranet

Lastly, in case you don t already know this, and don t have Excel on your computers, you can get it for free through IT s website under software.

More Skills 11 Format and Position Report Controls

Tutorial 1: Introduction to Tables, Forms, and Menus

Microsoft Access 2013

MS Access Let s begin by looking at the toolbar and menu of Access.

Formulas, LookUp Tables and PivotTables Prepared for Aero Controlex

HOW TO EXPORT BUYER NAMES & ADDRESSES FROM PAYPAL TO A CSV FILE

Introduction to Queries

GO! with Microsoft Access 2016 Comprehensive

Microsoft Access 2010

Complete Quick Reference Summary

Microsoft Access 2007 Module 2

Excel Tables and Pivot Tables

Using Excel to Troubleshoot EMIS Data

Integrating Word with Excel

Lab 01 Developing a Power Pivot Data Model in Excel 2013

Solar Campaign Google Guide. PART 1 Google Drive

Exchange (Copy, Import, Export) Data Between Excel and Access

Excel Level 1

PlanSwift. Import from Excel Tool User Guide UPDATED ON 6/26/2018. PlanSwift. Authored by: Dave Hansen

Microsoft Office 2010: Introductory Q&As Access Chapter 3

EVALUATION COPY. Unauthorized Reproduction or Distribution Prohibited

Using Microsoft Excel

SOFTWARE SKILLS BUILDERS

Designing Forms in Access

Microsoft Access II 1.) Opening a Saved Database Music Click the Options Enable this Content Click OK. *

Open Excel by following the directions listed below: Click on Start, select Programs, and the click on Microsoft Excel.

Using Reports. Access 2013 Unit D. Property of Cengage Learning. Unit Objectives. Files You Will Need

1. AUTO CORRECT. To auto correct a text in MS Word the text manipulation includes following step.

EDIT202 Spreadsheet Lab Prep Sheet

Advanced Excel. Click Computer if required, then click Browse.

John W. Jacobs Technology Center 450 Exton Square Parkway Exton, PA Introduction to

SharePoint SITE OWNER TRAINING

SAMPLE. Access 2010 Foundation. Access 2010 Foundation. Access 2010 Foundation Page 1

Advanced Excel for EMIS Coordinators

Microsoft Excel 2016 LEVEL 3

[ Getting Started with Analyzer, Interactive Reports, and Dashboards ] ]

TECHNOLOGY COMPETENCY ASSESSMENT MODULE Microsoft Access

Rev. C 11/09/2010 Downers Grove Public Library Page 1 of 41

As your databases continue to evolve, you will need to incorporate advanced queries and reports. This chapter addresses how to create and use action

Access 2010 Foundation. Access 2010 Foundation SAMPLE

Introductory Excel Walpole Public Schools. Professional Development Day March 6, 2012

2. This is a cell; this cell is designated as A1.

Reporting Excel Tutorial

Access 2000 MICROSOFT. Level One Basic. Version N2

Transcription:

The Business School BUACC5937: Information Systems Design and Development for Accountants Mégabite Restaurant e-commerce System Invoice Learning About Relational Database By using Microsoft Access 2010 Acknowledgements: Windows and Microsoft Access are registered trademarks of Microsoft Corporation.

BUACC5937 Assignement 2: 2012/17 This assessment addresses the following criteria from the course profile: Knowledge Understand the principles of data management and relational database Explore the domain of e-commerce Skills Develop an order-entry software system using relational database software and prepare an associated report detailing the technical and learning issues encountered Work effectively as a team member Values Appreciate the evolving nature of accounting information systems, and how these are reshaping the practice of accounting; This assignment is designed to help you understand how data is stored and information is retrieved in information systems. Working together in teams of two, you will develop skills with Microsoft Access and Word. It contributes 20% towards the overall assessment in the unit. It is best if you: Read through the entire assignment before you commence work; Prepare your report at the same time as you create your software; Learn how to capture screen shots, trim the part you want, and then place these screen shots into a word document before you begin preparing your report; Understand that this assignment is not only about learning MS Access, it is about how to go about developing a new skill. Relax and enjoy doing this assignment. You can learn a lot. If you make mistakes, that s great! It is by correcting mistakes, or deleting part of the work already done and re-doing it that we learn. In IT attention to detail is most important. This assignment demonstrates the importance of attention to detail, something you can apply to your studies and your work. Before you commence work on this assignment, it is strongly suggested you work through one or more of the on-line tutorials at http://office.microsoft.com/en-us/access-help/ch010372755.aspx to become familiar with Access 2010. This website has free on-line courses showing you (among many other things) how to create tables (the basic components of a database) and when to use Access and when Excel is to be preferred. BUACC5937 August 12 Page 2 of 31

Assignment: Background Information Megabite is an Indian diner located in Potts Point, Sydney. As a part of the marketing strategy the owners, Sri and Jaswinder, approached VETSOL to create a website for them. VETSOL created a static website. Sri and Jaswinder also advertised their site and products on Menulog (http://menulog.com.au), Cudo (http://www.cudo.com.au ), and Groupon (http://www.groupon.com.au). Their online marketing strategy received an overwhelming response. Sri and Jaswinder are satisfied with the response. They decided to develop an e-commerce system to sell their products online. They approached you and your partner for help. Your task is to develop an Access database that can store the Megabite menu items, customer details, and the sales. They also need a report of the sales at the end of the day. A part of Megabite s menu is shown in Figure 1. Figure 1: Megabite Menu BUACC5937 August 12 Page 3 of 31

Database Specification Submission requirements The assignment to be undertaken involves: 1. Designing and creating two basic tables for the application: A MenuItems table, detailing all the items sold by Megabite as shown in Figure 1. A Customer table, detailing the customer number, name, and contact details. 2. Designing and creating two tables SaleHeader and LineItem that are required to store the online order information. 3. Creating a form OrderEntryForm - for entry of the online orders into the tables created in Point 2 above. 4. Extracting the information from the data entered into the system using MS Access Queries. 5. When the basic system described in points 1-3 above is working, a new improved form is created using the queries in Point 4 above. 6. Generating a form invoice to issue to the customers. In addition to preparing the Megabite e-commerce System you are required to prepare a write-up of around 1,500 2,000 words explaining: The principles of database design, as demonstrated by the database design for this project. Research some introductory database design material on the web and refer to it in your report; in particular, show that you understand what a primary key is, what a foreign key is, what a datatype is, also what an autonumber is and how these are used in a database. Explain how you created your forms, step-by-step. Include some screen shots of your final forms in your write-up. Explain how you created and formatted the required report, step-by-step. Mention the problems you experienced with this assignment (you will experience plenty) and explain how you got around them; and Your report needs to look like a business report with sections including executive summary, table of contents, list of figures, and references. BUACC5937 August 12 Page 4 of 31

Creating a Database 1. Open MS Access from the start menu. 2. Select Blank database as shown in Figure 2. 3. Enter the file name in the space provided as shown in Figure 3. Note: for me it is Sri-Jaswinder. For you it is your name and your partners name Figure 2: Select Blank database 4. Select the file storage location by clicking on the folder icon shown in Figure 3. 5. Finally click on the Create icon shown in Figure 3. 6. MS Access creates a database as required. 7. Close the database and verify whether it is stored in the correct location. Figure 3: Name the database with database partners' name Creating Tables To start with, this restaurant e-commerce System application requires a Customer, MenuItems, Sale Header and LineItem tables. It is suggested you use a consistent naming method for the tables; commonly a Customer table will be called tblcustomer and MenuItems will be called tblmenuitems. Good discipline in these matters makes it easier to find parts of the application quickly as it increases in size. 1. To create tables in the database launch MS Access and open the database sri-jaswinder. 2. Select Create from the file menu as shown in Figure 4. 3. Click Table as shown in Figure 4. Figure 4: Select Create Table BUACC5937 August 12 Page 5 of 31

4. Select View from the ribbon as shown in Figure 5. 5. Select Design view from the dropdown menu as shown in Figure 5. 6. MS Access will prompt you for a table name as shown in Figure 6. Figure 5: Select Design View Figure 6: Naming tblcustomer 7. Enter the table name as tblcustomer 8. Click OK to save the table. 9. Close the table by clicking the X at the right hand side of the table. This is not the X at the very top of the screen which will close the MS Access. 10. Repeat steps 2 to 9 to create the remaining tables: o o o tbllineitem tblmenuitems tblsaleheader Figure 7: All four tables created 11. Once all the tables are created your database should look like the one in Figure 7. Notice that all tables are closed. You can open any table by double clicking on the table name. Remember to work with one table at a time and if you don t need it just close it. Defining Fields and Datatypes Relational databases, such as MS Access, store data and provide information. A significant difference between a relational database and a Spreadsheet (such as Excel) is that with database the design stage and the data entry stage are more obviously separate. In MS Access it is necessary to design the data structure (based on our understanding of the user s requirements) before entering the data. Designing the structure means creating each field (or column) that is needed, giving it a name, specifying what type of data it will store (e.g. a number, a date, text, a currency value), what size it is (e.g. this data item will not exceed 24 characters in length; this number has two decimal places) and defining the relationships between the tables. BUACC5937 August 12 Page 6 of 31

Consider tblmenuitems. Each menu item requires a unique ID so the system distinguishes between the menu items, for example Karachi Prawn can be identified by the system as Menu Item Number 1. Similarity, in tblcustomer each customer requires a unique ID (the primary key), so a business VETSOL could have the ID CVETS001 and an individual Sai Lakkaraju could have the ID ISAIL001. The required data for each MenuItem includes: Menu Item Identifier (a unique field to identify the card, we ll use Auto number data type); Item Name; Item Price; Item Type; and Item Category. We define these data items as the fields of the table- tblmenuitems. This is a fairly straightforward process as follows: 1. Double click on tblmenuitems to open it. 2. Change the View to Design View 3. Enter the field Names and data types as shown in Figure 8 (make sure you have a primary key identified) Figure 8: tblmenuitems in Design View 5. Set the Field Properties for individual fields 4. Enter the descriptions for each field. This helps to identify the foreign keys. o An example for setting the field properties for the field Item Name is shown in Figure 9. Setting the field properties will save you a lot of storage space. 6. Close the table by clicking the X at the right hand side of the table. 7. Similarly update the tables; tblsaleheader and tbllineitem as shown in Figure 10 and Figure 11. o A challenging task would be setting the default date for Sale Date to the system date in Figure 10 and restricting the menuitemquantity to a whole number in Figure 11. 8. Close the table by clicking the X at the right hand side of the table. Figure 9: Field Properties for the field - Item Name BUACC5937 August 12 Page 7 of 31

Figure 10: tblsaleheader in Design View Figure 11: tbllineitem in Design View To test your knowledge tblcustomer is shown in Datasheet View in Figure 12. Try to update the table in Design View. The challenge would be identifying the data types and the field properties. Don t enter the data yet. We will the data only after creating the relationships. Figure 12: tblcustomer in Data Sheet View Creating Relationships MS Access is a relational database. It divides the database into several tables to reduce the data redundancy. Some fields might appear in more than one table. For example, the field CustomerID is used in tblcustomer and in tblsaleheader. Moreover, CustomerID is the primary key of the tblcustomer. When a customer comes to Mégabite for the first time their details will be entered into the customer table. Later, any purchases made by the customer are entered into the tblsaleheader. That means the CustomerID in tblsaleheader can only be from tblcustomer. This can be achieved by defining a relationship between the two tables by using Look up Wizard data type. BUACC5937 August 12 Page 8 of 31

Creating a Relationship between tblsaleheader and tblcustomer 1. Open tblsaleheader in Design View 2. Select the data type of CustomerID and choose Look up wizard as shown in Figure 13. 3. MS Access activates a Wizard to guide you through the process. 4. The Wizard wants to know from where does the CustomerID values come from? So it will ask you the question as shown in Figure 14. As we know the CustomerID comes from an existing table (tblcustomer) we will choose the first option as shown in Figure 14. Click Next to move to the next question. Figure 13: Choose Lookup Wizard data type for the field "Customer ID" Figure 14: Choose the first option and click next 5. Now the Wizard wants to know the table name, so it will give you another screen similar to the one in Figure 15. We know that the field CustomerID comes from the table tblcustomer, we will choose that table. Click Next to go to the next question. Figure 15: Choose tblcustomer BUACC5937 August 12 Page 9 of 31

Figure 16: Select CustomerID 6. Now the Wizard wants to know the field name to link to. 7. Select CustomerID in the available fields and click the Right arrow (Greater than symbol) to move it to the Selected Fields. If you have followed the process correctly, your screen should look like the one shown in Figure 16. 8. Click Next to go to the next question. 9. Lookup wizard wants to know the sort order it needs to use, this really does not matter to us. 10. Select the CustomerID from the dropdown list as shown in Figure 17. Figure 17:Choose the sort order 11. Click Next to go to the next question. 12. Lookup wizard wants to know the width of the column as shown in Figure 18. Set the column width as needed or just leave it as it is. 13. Click Next to go to the next question. Figure 18: Selecting the column width BUACC5937 August 12 Page 10 of 31

14. Before finalising the relationships, the wizard wants to know the label for the lookup field as shown in Figure 19. Figure 19: Label and Data Integrity 15. Enable the Data Integrity checkbox as shown in Figure 19. This will help you in keeping the data consistent. 16. Click Finish to end the wizard. 17. Lookup Wizard finishes its job and leaves to the question Whether to save your work or Not? as shown in Figure 20. 18. Select Yes to save the table. 19. Close any open tables. Figure 20: Save the table Testing the relationship MS Access provides us with several database tools to check the relationships between the tables. To test the relationship we just have created; 1. Select the Database Tools from the menu bar. 2. Click on the Relationships icon in the ribbon as shown in Figure 21. 3. The output should look like the one shown in Figure 22. 4. As you can see from Figure 22, the primary key of table tblcustomer CustomerID is connected to a foreign key CustomerID in the table tblsaleheader. Figure 21: Checking the Relationships BUACC5937 August 12 Page 11 of 31

Note: if don t see the numbers: 1 and, on the connector line you forgot to enable the Referential Integrity as discussed in Figure 19. 5. Once you saw the relationships, close it by clicking X on the right side of the window. Figure 22: relationship between tblcustomer and tblsaleheader Creating the rest of the relationships 1. Create a relationship between SaleHeaderID in tbllineitem to SaleID in tblsaleheader 2. Create a relationship between menuitemid in tbllineitem to menuitemid in tblmenuitems. Testing all the relationships If you have followed the procedure correctly, your relationships window looks like Figure 23. Figure 23: All relationships Created Note: if you cannot see all the tables in the relationships window, right click the mouse for the floating menu as shown in Figure 24 Select Show all option. Move the tables around for visual clarity. Figure 24: Show all relationships BUACC5937 August 12 Page 12 of 31

Data entry Now is time to enter the data as the database structure is complete. We have defined the tables, fields and their data types. Moreover, we entered the field properties and created the relationships between the tables. Let us first look at the two major tables; Customers and Menu. The customers will walk into the restaurant and order the food from the Menu. We have to provide the same service to the online customers. The online customer data goes into the tblcustomer and the menu will be served from the tblmenuitems. To enter data into tblmenuitems : 1. Open tblmenuitems in Datasheet View to enter the menu item details from Figure 1. 2. Enter data as shown in Figure 25. 3. Once you enter the data close the table. Figure 25: tblmenuitems in Data Sheet View Similarly, enter the data into the customer table - tblcustomer as shown in Figure 12. Make sure you enter your own name, and your partner s name, as the contact for two of the new customers. 7 customers in total must be present in your final submission. Enter some data into the sale header table tblsaleheader similar to that in Figure 26. Figure 26: tblsaleheader in Data Sheet View SaleID (auto number) is inserted by the system, Sale Date will be a date selector and by default is set to the current date, if you have taken up the challenge task, and CustomerID will be a drop down box that shows the customer information from the customer table (tblcustomer). BUACC5937 August 12 Page 13 of 31

Enter some data into the Line Item table - tbllineitem as shown in Figure 27. Figure 27: tbllineitem in Data Sheet View Notice the dropdown boxes for the fileds SaleHeaderID and menuitemid. The data for the dropdown boxes come from tables- tblsaleheader and tblmenuitems respectively. Make sure you entered line items for all the three sales mentioned in Figure 26. Creating a Sale Data Entry Form With tblcustomer and tblmenuitems, it is very simple to type data directly into the tables. The customer order data on the other hand requires two tables to be updated tblsaleheader with the customer information and tbllineitem with the menu item information. To simplify this process forms are used. The purpose of a form is to update a table, or several tables. Step 1 to automating the processing of sale data entry is to create a form- frmsaleheader to update tblsaleheader with the header information from the customer order. Figure 28: Activating Form Wizard 3. Form Wizard starts working. The first thing it wants to know is the details of relevant table. As this form updates tblsaleheader select that table as shown in Figure 29. 4. Form wizard shows you the fields available in the selected table. 5. We need al fields so click on the >> as shown in Figure 29. Figure 29: Select the table tblsaleheader 1. Select Create from the menu bar. 2. Click Form Wizard icon on the ribbon to activate the form wizard. BUACC5937 August 12 Page 14 of 31

Figure 30: All fields selected Figure 31: Form Layout options 6. Your screen looks like the one in Figure 30, if you have followed step 5 correctly. 7. Click Next to go to the next question. 8. The form wizard wants to know the layout of the new form. There are four layout options available as shown in Figure 31. 9. Select the Columnar option as shown in Figure 31. 10. Click Next to go to the next question. 11. The form Wizard wants to know the name of the form before creating it as shown in Figure 32. 12. Name your form with your name and your partner s name. 13. Click Next to see the form you have created. It should look similar to the one shown in Figure 33. 14. Save and close the form. Figure 32:Name the form with Assignment Partners' names BUACC5937 August 12 Page 15 of 31

Figure 33: Basic data entry form Creating a Line Item Form The limitation of the form shown in Figure 33 is that it only updates the data in tblsaleheader. In order for it to update both tblsaleheader and tbllineitem a second form is needed. So let us create it. 1. Activate the form wizard as shown in Figure 28. 2. Select tbllineitem as shown in Figure 34. 3. Select the fields; menuitemid and menuitemquantity as shown in Figure 35. Figure 34: Select "tbllineitem" 4. Click Next Note: LineItemID is not required as it is Autonumber, meaning selfgenerating. SaleHeaderID is not required as it is captured from the primary form shown in Figure 33. Figure 35: Select the required fields BUACC5937 August 12 Page 16 of 31

5. Choose the sub-form layout as Tabular as shown in Figure 36 so that multiple rows appear on one screen. 6. Click Next 7. Name the sub-form as shown in Figure 37. Note: The name of the sub-form does not really matter as it will be removed later. Figure 36:Choose Sub-form Layout 8. Click Next 9. The form wizard creates the sub-form as shown in Figure 38. Notice that the values you entered in the data entry section automatically appears in the form. 10. Close the sub-form. Figure 37: Name the sub-form Figure 38: LineItem sub-form created BUACC5937 August 12 Page 17 of 31

Combining both the forms Now we have to combine both the forms so that the data entered in the combined form can update both the tables at once. 1. Open the Srijaswinder sale data entry form in design view as shown in Figure 39. 2. Drag the Form Footer down and make space for the sub-form. Figure 39: Sri-Jaswinder Sale data entry from in "Design View" 3. Drag and drop the tbllineitem sub-form into the main form as shown in Figure 40 4. Save the form. This form can be used to enter data into both the tables. 5. View the form in Form View. It should look similar to Figure 41. Figure 40: drag and drop the "tbllineitem" sub-form BUACC5937 August 12 Page 18 of 31

Data Entry using the form 1. Enter at least one more sale using this form as shown in Figure 41. Note: To enter a new record, you must click the >* navigation button. This will save the current record and moves to the end of the file. Figure 41: Complete sale form in "Form View" 2. Close the form. 3. Open the tblsaleheader and notice the added sale number 4 as shown in Figure 42. Figure 42: tblsaleheader Updated BUACC5937 August 12 Page 19 of 31

4. Close the table tblsaleheader. 5. Open tbllineitem and notice the added items 7,8, and 9 as shown in Figure 43. Figure 43: tbllineitem Updated It is worthwhile studying Figure 42 and Figure 43 for several minutes as they demonstrate the main principle of relational database. The relationship between the tables is formed by having SaleID (which is the primary key in tblsaleheader) included as SaleHeaderID - a data item in tbllineitem. Similarly, the MenuItemID (which is the primary key in tblmenuitems) is also included as a data item in tbllineitem. 6. Close the table tbllineitem. Updating the form to make sense It is time to improve the tbllineitem sub form by: Removing the text tbllineitem from the top of the sub form; Removing the navigation buttons from the bottom of the sub form; Replacing the MenuItem ID with Menu Item Name combo box for more readability; and To replace the Menu Item ID textbox. 1. Open the Sri-Jaswinder Sale data entry form in design mode as shown in Figure 40. 2. Select the label tbllineitem and delete it (you will find two so you have to repeat this process twice). BUACC5937 August 12 Page 20 of 31

3. To remove the navigation buttons from the foot of the sub form a. Click on the property Sheet icon as sown in Figure 44 on the ribbon. This will enable the property sheet window. Figure 44 b. Select the sub-form. A yellow line appears around the sub-form as shown in Figure 45. Figure 45 c. Click the square shaped box in the top left corner of the sub-form. The box will look like Figure 46. Figure 46 d. Check the property sheet. It should look like Figure 47. e. Look for the Navigation Buttons property as highlighted in Figure 47. f. Change its property to No g. Check the form in Form View. The navigation bar is not displayed anymore. h. Change to Design View again. Figure 47: Property Sheet for the sub-form BUACC5937 August 12 Page 21 of 31

4. Let us focus on replacing the MenuItem ID with Menu Item Name combo box, make sure you are in the design view. a. Select the MenuItemID as shown in Figure 48 and delete it. b. Click the Combo Box Wizard on the ribbon, highlighted in Figure 49 to activate it. c. The Mouse pointer will change its shape to a Combo Box. Figure 48 Figure 49 d. Click in the sub-form. An Unbound combo Box will be inserted and the Wizard takes over as shown in Figure 50. Figure 50: Combo Box wizard activated e. We have to link the combo box to existing values. So choose the first option and click Next. BUACC5937 August 12 Page 22 of 31

f. We have to link the combo box to values in tblmenuitems, so select that table as shown in Figure 51. g. Click Next. Figure 51: Combo Box Table Selection h. We have to choose the filed Item Name from the table tblmenuitems. Select the field as shown in Figure 52. i. Click Next. Figure 52: Field selection from "tblmenuitems" j. Choose the sort order as shown in Figure 53. k. Click Next Figure 53: Select the sort order l. The column width of the combo box can be changed at any time so accept the values as is. m. Click Next Figure 54: Column Width selection BUACC5937 August 12 Page 23 of 31

n. Store the value in the field menuitemid as shown in Figure 55. o. Click Next Figure 55: Storing the value p. The combo box wizard asks you for the name of the new combo box just been created. Name it as Item Name as shown in Figure 56. q. Click Finish Figure 56: Naming the Combo Box 5. Change the Labels Menu Item" and Menu Item Quantity to Item Name and Quantity and see your form in Form View. It should look similar to Figure 57. Close the form. Figure 57: Completed Sale Data Entry form BUACC5937 August 12 Page 24 of 31

Creating an invoice Now that we have a method of entering data, the challenge becomes how to generate an invoice. For this assignment, the invoice information will be displayed on a form. The information required is: The sale ID and the date it was entered on (this provides an audit trail); Customer details; Menu item details with line total; and The invoice total Just like the sale data entry form we will create an Invoice header and invoice body. However, the details in these forms come from a number of tables so we create several queries to feed the data into the forms required. Creating Invoice header query The invoice header form requires fields- sale ID, sale date, and customer details. Sale ID and Sale Date comes from the table- tblsaleitem and the customer details come from the table tblcustomer. We will create a query to combine all these details. Let s call this query qryinvoiceheader. The query is created as follows: Figure 58: Query Design 1. Click Create tab on the menu bar 2. Click on the Query Design icon on the ribbon. 3. You will see a new window similar to Figure 59 that enables you to choose the required tables. 4. Select tblcustomer and click Add 5. Select tblsaleheader and click Add 6. Close the window by clicking Close Figure 59: Select tblcustomer and tblsaleheader 7. The query screen contains the two selected tables similar to Figure 60. Notice that it also shows their relationship, if any exists. BUACC5937 August 12 Page 25 of 31

8. Select the fields required by the query as shown in Figure 61. 9. Test the query with the help of your tutor. 10. Save the query as qryinvoiceheader and close it. Figure 60: Query tables selected Figure 61: Invoice header fields selection Creating Invoice Header form based on the query Now this query will be used to display data on the new form we are creating. Make sure you close the query before attempting to create a form based upon it. 1. Select the form wizard as shown in Figure 28. 2. Select the query qryinvoiceheader and select all its fields as shown in Figure 62. 3. Click Next Figure 62:Select the query and its fields 4. We want to view the data by Sale, so select by tblsaleheader as shown in Figure 63. 5. Click Next 6. Select the layout of the form as shown in Figure 64. 7. Name the form as frminvoiceheader and Click Finish to see your form. BUACC5937 August 12 Page 26 of 31

Figure 64: Layout Selection Figure 63: select tblsaleheader 8. View the invoice header form in Design View and make changes so that it looks like Figure 65. Figure 65: Invoice Header in Form View Creating Invoice Body Query The task now is to show the invoice body of any selected sale ID. This involves having a second panel on the form which displays a row for the Item name, Item Quantity, Item price and the line total. Line total is the total sale value of that line, and the sub form will also show the invoice total. The query for this is shown Error! Reference source not found.. Note that this query has a calculated field LineTotal. The syntax of MS Access is a little unusual with the colon : indicating =, and the variables surrounded by square brackets. LineTotal: [Quantity]*[CardSalePrice] multiplies the number of items purchased by the sale price of the item. The result is stored in a variable named LineTotal. Save the query as qryinvoicebody and close it. BUACC5937 August 12 Page 27 of 31

Figure 66: Query Invoice Body Creating Invoice body form based on the query Now this query will be used to display data on the new form we are creating. This is the same process as explained in the section above. 1. Select the form wizard as shown in Figure 28. 2. Select the query qryinvoicebody and select all its fields as shown in Figure 67. 3. Click Next Figure 67: Selecting the fields 4. Select the layout of the form as shown in Figure 68. 5. Name the form as frminvoiceheader as shown in Figure 69 and Click Finish to see your form. Figure 68: Layout Selection Figure 69: Name the form BUACC5937 August 12 Page 28 of 31

Change the form view to Design View and adjust the width of the fields to show the data, and make the headings meaningful. Place a textbox at the top of the form to display the Invoice total. To get the sub-form total revenue in this text box you need to select it, in Design view, and type the formula =sum ([LineTotal]) into the textbox. Give appropriate name to the textbox. Your completed form in the form view will look like Figure 70. Close the form. Figure 70: Body of the Invoice Combining Invoice header and body Now we will combine the Invoice header and body to create the invoice. 1. Open the frminvoiceheader in design view. 2. Drag the form footer down as required. 3. Select the sub-form option as shown in Figure 71. Figure 71: Sub-form control 4. MS Access launches a wizard to help you to define what you want this form to achieve. 5. We want to use an existing form frminvoicebody as the sub-form. Hence, select the options as shown in Figure 72. BUACC5937 August 12 Page 29 of 31

6. Click Next 7. The next Screen allows us to define the relationship between the main form, and what will be displayed in in the sub form. Figure 73 below shows what we need to do, that is to show all rows relating to the selected Sale ID. 8. Click Finish to see the Invoice form. Figure 72: Sub form selection 9. Once you looked around the form in Form View, change the view to Design View and make necessary changes so that it looks like Figure 74. Figure 73: The connection between the two forms Note: You have to delete the unnecessary text boxes, sub-form navigation and format the fields as required. Figure 74: Invoice BUACC5937 August 12 Page 30 of 31

Enter four or five more sales into your system so you can provide screen shots of several invoices in your report with some more data. Assessment Criteria Your work will be assessed on the following criteria: 1. Your submission must look and be professional. It must be neat, readable, legible and complete. It must be your own work. 2. Originality is highly regarded. 3. Your attention to detail with both your application and your report. 4. Your demonstrated engagement with the assignment and understanding of the issues related to it. 5. Your final report will demonstrate your capacity to use MS Word to include screen shots (for example a table design, or a query in design view or report view) to highlight key features of your work. Note: 1. All written work must conform to the University of Ballarat General Guide for the Presentation of Academic Work. 2. For all written work students must ensure that they submit their own original work. In Regulation 6.1.1 of the University of Ballarat plagiarism is defined as the presentation of the works of another person / other persons as though they are one's own by failing to properly acknowledge that person / those persons. BUACC5937 August 12 Page 31 of 31