school of business · generate a payslip (challenge task) buacc5937 june 14 page 3 of 31 database...

32
School of Business BUACC5937: Information Systems Design and Development for Accountants Mudusu Calling Cards System (MCCS) Learning About Relational Database By using Microsoft Access 2010 Acknowledgements: Microsoft Windows, Microsoft Word, and Microsoft Access are registered trademarks of Microsoft Corporation. Images on the front page are adapted from Microsoft Word clipart gallery. Invoice

Upload: others

Post on 26-Mar-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

School of Business

BUACC5937: Information Systems Design and Development for Accountants

Mudusu Calling Cards System (MCCS)

Learning About Relational Database

By using Microsoft Access 2010

Acknowledgements: Microsoft Windows, Microsoft Word, and Microsoft Access are registered trademarks of Microsoft Corporation. Images on the front page are adapted from Microsoft Word clipart gallery.

Invoice

Page 2: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 1 of 31

BUACC5937 Assignment 2: Term02 - 2014

This assessment addresses the following criteria from the course profile:

Knowledge

Understand the principles of data management and relational databases.

Skills

Develop a time sheet entry/customer account management 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 to 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 also about the approach to 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 to 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/download-office-2010-training-HA101901726.aspx?CTT=1 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 to use Excel.

Page 3: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 2 of 31

Background information

OnlineBuys, established is 2005, is primarily an e-business selling phone cards online.

They buy calling cards in bulk from several telecommunication companies such as

Telstra, Optus and Tel Pacific and sell them to individuals using their portal. Recently

they entered into the retail market by supplying calling cards to several grocery stores

in Sydney’s greater western region. They have employed four (4) sales personnel for this

purpose. The retail shops are distributed among the sales personnel, who every day

visits the shops, refill stock and collect the invoice amount. They have been using pre-

printed invoice books to invoice the customers.

Every fortnight employees submit their time sheets to S.R. Mudusu, the owner of

OnlineBuys. Each employee gets paid $18.70 per hour for the services rendered. Mr

Mudusu calculates the payment for individual employees and transfers the money

online. The pre-printed invoices and manual tallying of work hours worked well when

the company had only a few retail customers. Now, due to the increased number of

customers, S.R.Mudusu has decided to invest in a system to manage his retail sales. He

decided to hire a team of consultants (you and your project partner) to develop this

Mudusu Calling Cards System (MCCS).

Following are the business requirements of the proposed system (MCCS):

Add an employee (explained in the write up)

Add a customer (Challenge Task)

Add a Card (Challenge Task)

Sales entry (Explained in the write up)

Generate an Invoice (Explained in the write up)

Timesheet entry (Challenge Task)

Generate a Payslip (Challenge Task)

Page 4: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 3 of 31

Database specification and requirements

The assignment to be undertaken involves:

1. Designing and creating three basic (master) tables for the application:

An “Employee” table, to hold the details of employees.

A “Customer” table, to hold the details of customers.

A “Card” table, to hold the details of the cards.

2. Designing and creating a table – “TimeSheet” – that holds employee timesheet information.

3. Designing and creating two tables, “SaleHeader” and “LineItem” – to hold the sales records.

4. Creating three simple forms; UpdateCustomer, UpdateEmployee, and UpdateProject, to update data in respective tables.

5. Creating a form – “Time Sheet”, from multiple tables. This will be used by employees to enter the details of their working hours.

6. Creating a form “Sales” with a sub form that will be used by the sales personnel to enter the sales.

7. Improving the form - “Sales” when the basic system is working.

8. Extracting information from the data entered into the system using Access Queries.

9. Creating a form – “Invoice” that will help the sales personnel to invoice and to receive payments from the customers.

10. Creating a form – “Pay Slip” that will help Mr. Mudusu to review individual employees’ roster and payment information.

11. Creating a form – “Navigation Form” that will guide the stakeholders (Mr. Mudusu and his employees) in using this application.

In addition to preparing Mudusu Calling Cards System (MCCS) Software, 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 (use the online tutorials link in page 2) and refer to it in your report; in particular, show that you understand the key concepts such as primary key, foreign key, Datatypes, and field properties.

The process of normalisation, as done in the database.

Page 5: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 4 of 31

Your approach to completing the “Challenge tasks”. Include some screen shots of your final forms in your write-up.

The problems you experienced with this assignment (you will experience plenty) and how you got around them.

Your report needs to look like a business report with sections including executive

summary, table of contents, list of figures, and references. You can use this document as an example.

Read the Assessment criteria and Assessment submission details provided in Page 29. Moreover complete the checklist provided in Page 30 to get maximum marks in this assignment.

Creating a database

Figure 1: Select a blank database

1. Open MS Access from the start menu.

2. Select a Blank database as shown in Figure 1.

3. Enter the file name in the space provided as shown in Figure 2.

Note: It is “MCCS” for me. For you, It will be “your student ID and your

partners’ student ID”.

Figure 2: Name the database

4. Select the file storage location by clicking on the folder icon shown in Figure 2.

5. Finally click on the “Create” icon shown in Figure 2.

6. Close the database and verify whether or not it is stored in the

correct location.

Creating tables

MCCS requires six (6) tables: an Employee table, Customer table, Card Table, Sale Header table, Line Item table and a TimeSheet table.

Note: It is suggested that you use a consistent naming style for naming all the Access objects; using a prefix that represents the object type. For example, Employee table is named as tblEmployee. Similarly, a report will have a prefix - “rpt”, a query –

Page 6: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 5 of 31

“qry”, and a form will have a prefix - “frm” to their names. Good discipline in these matters makes it easier to find parts of the application quickly as it increases in size.

Figure 3: Select Create --> Table

1. To create tables in the database launch MS Access and open the database “MCCS”.

2. Select “Create” tab and click “Table” on the ribbon as shown in Figure 3. A table will be created, in the work area, in the datasheet view.

3. Click on the “View” and select “Design view”

from the dropdown menu as shown in Figure 4.

4. MS Access will prompt you for a table name as shown in Figure 5 before changing the view.

5. Enter the table name - “tblEmployee” and click “OK” to save the table. The table view in the work area will be changed to the design view, in which you can define table properties. We will do this in the next section.

6. 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.

Figure 4: Select Design View

7. Repeat steps 2 to 6 to create the remaining tables and name them as follows:

1. tblCustomer 2. tblCard 3. tblSaleHeader 4. tblLineItem 5. tblTimeSheet

8. Once all the tables are created your database should look like Figure 6.

9. Make sure you close any open tables in the working area.

Figure 5: Save as tblEmployee

Figure 6: All tables created

Page 7: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 6 of 31

Defining fields and their data types

Relational Database Management Systems (RDBMS), such as MS Access, store data and provide information. A significant difference between an RDBMS and a Spreadsheet application (such as Excel) is that with databases 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 requirements) before entering the data. Designing the structure means creating each ‘field’ (or column) that is needed, giving it a name, specifying its Data type, meaning -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 25 characters in length; this number has two decimal places) and defining relationships between the tables. Moreover, each record (row) in a table requires a unique ID, called primary key, so that the system can distinguish between the records.

There are other reasons for defining a primary key. You must investigate and explain them in your write-up.

The required data for each “Employee” in tblEmployee includes; ID (a unique field to identify the record, we’ll use “Auto number” data type), Name, Address, and Phone number.

We define these data items as fields of the table- tblEmployee. This is a fairly straightforward process as follows:

Figure 7: tblEmployee in Design view

1. Double click on tblEmployee to open the table.

2. Change its View to Design View.

3. Enter the field Names and their data types as shown in Figure 7 (make sure you have a primary key identified as marked in the figure)

4. Enter description for each field. This helps in identifying foreign keys.

5. Set Field Properties for individual fields.

o An example for setting field properties for the field “employee Name” is shown in Figure 8. This will save you a lot of storage space.

6. Close the table.

7. Update the table - tblCard as shown in Figure 9.

Figure 8: “employeeName” -Field properties

Page 8: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 7 of 31

Figure 9: tblCard in design view

8. To test your knowledge ‘Datasheet View’ of tblCustomer is shown in Figure 10. Create the table in ‘Design View’. You need customer ID, Name, Contact person, Phone number, and the address fields. Speak with your tutor if you need some help.

Figure 10: tblCustomer in Datasheet view

Figure 11: tblTimeSheet

9. Update the table – tblTimeSheet as shown in Figure 11. Set default date for “dateWorked” to the system date.

Make sure you add descriptions. They will help you in creating relationships between tables.

Figure 12: tblSaleHeader in design view

Figure 13: tblLineItem in design view

10. Update tables- tblSaleHeader and tblLineItem as shown in figures Figure 12 and Figure 13 respectively

11. Close any open tables.

Don’t enter the data yet. We shall enter data only after establishing

relationships between the tables

Page 9: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 8 of 31

Creating relationships

MS Access is a relational database management system. It divides the database into several tables to reduce the data redundancy. Some fields may appear in more than one table. For example, the field “employeeID” in tblTimeSheet comes from the table – tblEmployee. Meaning- an employee of MCCS can only submit their timesheet. Similarly, other relationships are described in the description field in tables- “tblSaleHeader” and “tblLineItem”. These relationships will be established using “Lookup Wizard” data type.

Creating a relationship between tblTimeSheet and tblEmployee

Figure 14: Choose Lookup Wizard

1. Open “tblTimeSheet” in Design View.

2. Select the data type of “employeeID” as “Look up wizard” as shown in Figure 14.

3. MS Access activates a wizard as shown in Figure

15. It starts by asking the table name. As the value of the lookup field comes from an existing table (tblEmployee), choose the first option and click “Next”.

Figure 15: Choose the first option and click next

Figure 16: Choose tblEmployee

4. As shown in Figure 16, the Wizard wants to know the table name. Select the table- “tblEmployee” and click

“Next”.

5. The Wizard wants to know the “field name”.

Page 10: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 9 of 31

Figure 17: Select the field – employee ID

6. Select “employeeID” 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 will look like Figure 17. Click “Next”.

7. Lookup wizard wants to know the sort order it needs to use, this really does not matter to us. Select “employeeID” from the dropdown list as shown in Figure 18 and click “Next”.

8. Lookup wizard wants to know the

width of the column in the next screen (picture not shown). Just leave it as it is and click “Next”.

9. Before finalising the relationship, the wizard wants to know the label for the lookup field. Give it a name and enable the Data Integrity checkbox as shown in Figure 19. This will keep the data consistent.

10. Click “Finish” to end the wizard.

11. Lookup Wizard finishes its job and leaves you with the question whether to save the table or not. Click “Yes” to save the table.

12. Close any open tables.

Figure 18: Choose the sort order

Figure 19: Enable data integrity

Testing the relationship

MS Access provides us with several database tools to check relationships between the tables. To test the relationship we just have created:

Figure 20: Click relationships

1. Select the “Database Tools” from the menu bar.

2. Click on the “Relationships” icon in the ribbon as shown in Figure 20.

3. The output should look like Figure 21.

Page 11: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 10 of 31

As you can see, the primary key of the table “tblEmployee” – “employeeID” is connected to a “foreign key” – “employeeID” in table “tblTimeSheet”. Note: if you don’t see the numbers:

1 and ∞, on the connecting line you

forgot to enable the “Referential Integrity” as discussed in Figure 19. You have to explain the meaning of 1

and ∞ relationship in your write-up.

Figure 21: Relationship between tblProject and

tblCustomer

4. Once you see the relationships, close the relationships window by clicking “X” on the right side of the window.

Creating rest of the relationships

Open the table –“tblSaleHeader” in design view and create the following relationships;

1. “employeeID” to “employeeID” in “tblEmployee”

2. “customerID” to “customerID” in “tblCustomer”.

Open the table –“tblLineItem” in design view and create the following relationships;

1. “saleID” to “saleID” in “tblSaleHeader”

2. “cardID” to “cardID” in “tblCard”.

Testing all of the relationships

Check the relationships as explained in the “Testing the relationship” section above. If you have followed the procedure correctly, your relationships window will look like Figure 22. Move the tables around for visual clarity.

Figure 22: All relationships created

Page 12: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 11 of 31

Note: if you cannot see all the tables in the relationships window, select the “Relationship Tools” and click “All Relationships” icon as shown in Figure 23. Close the relationships window once you are happy with it.

Figure 23: Show all relationships

Initial data entry Now is the time to enter data as the database structure is complete. Let us first look at the employee table. We know that S.R. Mudusu is an employee for taxation purpose. To enter his data into “tblEmployee”:

1. Open the table in ‘Datasheet View’ and enter data as shown in Figure 24. 2. Once the data entry is complete close the table. 3. Enter data into “tblCustomer” as shown in Figure 10.

Figure 24: tblEmployee sample data

4. Open “tblCard” and enter data as shown in Figure 25.

Figure 25: tblCard with sample data

5. Enter some data into “tblTimeSheet” as shown in Figure 26.

Notice the dropdown box for the field “employeeID” as the data comes from another table – tblEmployee.

Figure 26: tblProject in datasheet view

Similarly, if you enter some data manually into “tblSaleHeader” and “tblLineItem” you may notice dropdown boxes for the foreign keys. This is how MS Access creates relationships between the data. However, let us not do it for time being. (Note: you have to enter data into “tblSaleHeader” first.)

Page 13: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 12 of 31

We saw how to enter data manually into the tables in this section. However, data is entered into the tables through a “form”. Let us create some simple forms to enter data into several tables.

Update Employee form

Figure 27: Update Employee form

The update employee form is shown in Figure

27. The process of creating this form is explained below. You must familiarise yourself with this

process as you will be creating several forms in this assignment.

Figure 28: Activating the form wizard

1. Select “Create” from the menu bar. Click the “Form Wizard” icon on the ribbon to activate the wizard as shown in Figure 28.

Figure 29: select -tblEmployee

2. Form wizard starts working by asking you for the table name. As this form updates employee data from “tblEmployee”, select the table as shown in Figure 29.

3. You can see the Available Fields. Select all the fields by clicking “>>” symbol to move them to “selected fields” box.

4. After selection, your screen should look like Figure 30. Click “Next”.

5. Choose “Columnar” option as shown in

Figure 31 and click “Next”. 6. The form wizard wants to know the

name of the form before creating it as shown in Figure 32.

7. Name the form-“frmUpdateEmployee” and click “Next”.

8. An un-formatted form appears on the screen, which looks like Figure 33.

Figure 30: Field selection

Page 14: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 13 of 31

Figure 31: layout option

Figure 32: Name the form

9. We have to format the form so that it looks like the one shown in Figure 27. We can use either the “Design View” or the “Layout View” for this purpose. Let us open the form in “Layout View” by clicking “View” and then selecting the “Layout View” as shown in Figure 34. You will see two changes; a. The ribbon changes to “Form Layout Tools” and gives you several options as

shown in Figure 35, and b. A “Yellow box” appears around the “employee Name” text box as shown in Figure

36. You can move this box around the fields and edit them as you wish.

Figure 33:Update Employee form –Unformatted

Figure 34: Change View

Figure 35: Form Layout Tools

Page 15: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 14 of 31

10. Select individual fields and update them as required such that the output looks like Figure 27 or Figure

37. You may have to use different fonts, fill colour option etc.

Figure 36: Form in Layout view

Figure 37: Data entry using the form

Once you have formatted the form. Enter several employee details into the system using this form as described below;

11. Open the form in “Form View” and enter employee details.

12. Click on the “New (Blank) record” (>*) button to store existing record and create a new blank record as shown in Figure 37.

13. Make sure you enter at least 10 employees including your partner and yourself.

14. Close the form, once data entry is complete.

15. Open the table-“tblEmployee” in data sheet view. It should have all the 10

employee records you entered.

Now you know how to create a simple form and use it to enter data into a table.

12

Page 16: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 15 of 31

Challenge Task - 01

Your first challenge task involves creating two simple forms; frm Update Customer and frm Update Card, as shown in Figure 38 and Figure 39 respectively.

Figure 38: Update Customer form

Figure 39: Update Card form

Create these two forms and make sure you enter 10 records in each table.

Sales form

Now that you learned how to create a simple form that can update data in a single table, let us see how to create a form that can display data from multiple tables or update multiple tables. A good example for this is “Sales Order Entry Form”. This form, as shown in Figure 40 allows MCCS employees to view/update sales orders from their customers.

Figure 40: Completed Sales Order Entry Form

Page 17: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 16 of 31

The process of creating this form is described below:

1. Create a form - “frmSalesOrder”, from table –“tblSaleHeader” and by choosing all the fields. Use columnar layout option.

2. Create another form – “frmLineItem” from table – “tblLineItem” and by choosing fields; cardID, and Quantity. Use tabular layout option.

Combining both the forms

Figure 41: frmSalesOrder in Design view

Figure 42: Sub Form Inserted

1. Open “frmSalesOrder” in design view as shown in Figure 41.

2. Drag the “Form Footer” down and make space for the sub-form.

3. Drag and drop the “frmLineItem” into the main form as shown in Figure 42.

4. Save the form. This form can be used to enter data into both the tables. You can create a new order or update an existing order using this form.

Data entry using the form – frmSalesOrder

Let us enter some sales orders using the newly created form –“frmSalesOrder”. The process is straight forward as described below;

1. Open the form in “form View” as shown in Figure 43.

2. Enter a sale, as you can see I have created my first sale- saleID 1, as shown in Figure 43.

3. Close the form.

4. Open the tables – “tblSaleHeader” and “tblLineItem” and notice the added records as shown in Figure 44 and Figure 45.

Page 18: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 17 of 31

5. Similarly, you can enter several sale orders and line items using this form. Try it and close any open tables after your testing.

Figure 43: frmSalesOrder in Form View

Figure 44: Data entered into tblSaleHeader

Figure 45: Data entered into tblLineItem

Updating the form to make sense

Now that the form is working fine, it is time to improve its look and feel. First, we will improve the sub form - frmLineItem by:

Removing the text ‘frmLineItem’ from the top of the sub form;

Removing the ‘navigation buttons’ from the bottom of the sub form;

Replacing the “CardID” with “Card Name” combo box for more readability; and

Formatting the headings of the sub form.

The process is described below:

1. Open the form - “frmSalesOrder” in design mode. It looks like Figure 42.

2. Select the label “frmLineItem” and delete it (you will find two so you have to repeat this process twice).

3. To remove the navigation buttons from the foot of the sub-form:

Figure 46

Figure 47

Figure 48

a. Click on the property Sheet icon as shown in Figure 46 on the ribbon. This will enable the property sheet window.

b. Select the sub-form. A yellow line appears around the sub-form as shown in Figure 47

Page 19: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 18 of 31

c. Click the square shaped box on the top left corner of the sub-form. The box looks like Figure 48.

Figure 49: Sub-form Property sheet

d. Check the property sheet. It should look like Figure 49, in which the “Navigation Buttons” property is set to “Yes”.

e. Change the navigation buttons property to “No”

f. Check the form in “Form View”. The navigation bar is not displayed anymore.

g. Change to “Design View” again.

Note: If the navigation buttons are still visible, that means you missed step “C”. Repeat steps B to E until you get it right.

4. Let us focus on replacing the “CardID” with “Card Name” combo box. Make sure you are in the “design view” of the form.

a. Select the “cardID” combo box as shown in Figure 50 and delete it.

b. Click the “Combo Box” wizard in the design tab, highlighted in Figure 51 to activate it.

Figure 50

Figure 51: click on the Combo box

c. The mouse pointer will change its shape to a “Combo Box”.

Page 20: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 19 of 31

Figure 52: Combo Box wizard

d. Click in the “sub-form”. An “Unbound combo Box” will be inserted and the wizard takes over as shown in Figure 52.

e. We have to link the combo box to existing values. So choose the first option and click “Next”.

f. We have to link the combo box to

the values in the table - “tblCard”, so select it as shown in Figure 53 and click “Next”.

g. We have to choose the field “CardName” from the table. Select it as shown in Figure 54 and click “Next”.

h. Choose the sort order – “cardID” as shown in Figure 55 and click “Next”.

Figure 53: Choose tblCard

Figure 54: Choose title

Figure 55: Select the sort order

i. The column width of the combo box can be changed at any time so accept the values in Figure 56 and click “Next”

j. Store the value in the field “cardID” as shown in Figure 57 and click “Next”

k. The combo box wizard asks you for the name of the new combo box just been created. Name it as “Card Name” as shown in Figure 58 and click “Finish”

l. Change the Labels as needed and

see your form in “Form View”. It should look similar to Figure 59. Note: I have formatted the sub form, you will not see it in your work.

Figure 56: Column width selection

Page 21: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 20 of 31

Figure 57: Storing the value

Figure 58

Figure 59: Sales Order Entry form

Challenge Task – 02

Compare the figures - Figure 40 and Figure 59. The following differences are evident;

1. The “CustomerID” in the main form is replaced by “Customer Name”.

2. The “employee ID” in the main form is replaced by “Employee Name”.

3. The look and feel of the form.

Use the knowledge gained so far to implement these changes in your form so that it looks similar to Figure 40.

Enter some sales for all the customers, check the tables and close the form.

Page 22: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 21 of 31

Creating an Invoice form

Now that we have a way to capture the customers’ orders, we have to create an invoice that will be given to the customer at the end of the transaction. A sample invoice shown in Figure 60. Though you can use the MS Access reports for this purpose, we will use forms.

Figure 60: Invoice issued to a customer

As an accounting student you may already have the knowledge of creating an invoice. The invoice can be divided into two parts; header and body. Data for the header generally comes from tblSaleHeader and tblCustomer. Similarly, Data for the body comes from tblLineItem and tblCard. We will combine the data required for this form from tables using queries.

The process of creating an invoice involves;

Creating individual queries (qryInvoiceHeader and qryInvoiceBody) from the combined tables,

Creating individual forms from the queries, and

Combining both the forms.

This process is explained in the following sections.

Creating Invoice body query

Figure 61: Query Design

1. Click “Create” tab on the menu bar 2. Click on the “Query Design” icon on the ribbon as

shown in Figure 61. 3. You will see a new window similar to that of Figure 62

which enables you to choose required tables.

Invoice Header

Invoice Body

Page 23: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 22 of 31

Figure 62: Table selection

4. Select the tables; tblLineItem, and tblCard, individually and click “Add”.

5. Close the window by clicking “Close”. 6. The query screen contains two tables as shown in

Figure 63. Notice that it also shows their relationship, if any exists.

Figure 63: qryInvoiceBody in Design view

7. Select the fields required by the query as shown in Figure 63. a. The following fields from the selected tables are required:

tblLineItem: saleID, cardID, and quantity. tblCard: card name, and card sale price.

b. One calculated fields: (You have to use “Expression Builder in the Query Design tools”. Seek your tutors help in completing this part.)

LineTotal: [cardSalePrice]*[quantity]

8. Test the query with the help of your tutor. The output should look like Figure 64.

Figure 64: Query output

9. Save the query as “qryInvoiceBody” and close it.

Page 24: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 23 of 31

Creating Invoice Header Query

Create a query – “qryInvoiceHeader”

Hints:

The process is similar to creating the “qryInvoiceBody” explained above.

Use “tblSaleHeader”, tblEmployee, and “tblCustomer”.

tblSaleHeader: saleID, saleDate, and CustomerID.

tblEmployee: employeeName.

tblCustomer: customer Name, address, and phone number. When you run the query the output should look like Figure 65

Figure 65: qryInvoiceHeader output

Creating invoice body form based on the query

The body of the invoice uses the query – qryInvoiceBody to extract the data. Creating this form is very similar to the forms created so far except the use of a query.

Figure 66: Selecting the fields

1. Select “Form Wizard”.

2. Select “qryInvoiceBody” and its fields as shown in Figure 66.

3. Click “Next”

4. Select “Tabular” layout

5. Name the form as “frmInvoiceBody” and Click “Finish” to see your form.

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 in this text box you need to select it in Design view, and type the formula =sum ([LineTotal]) into the textbox. Your completed form in the form view will look like Figure 67. Format the cells as needed and close the form.

Page 25: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 24 of 31

Figure 67: partial view of the form- frmInvoiceBody

Creating invoice header form based on the query

Create a form – “frmInvoice”

Hints:

The process is similar to creating the “frmInvoiceBody” explained above.

Use the query -“qryInvoiceHeader”.

Choose all the fields.

When the wizard asks you “How do you want to view your data?” choose “by tblSaleHeader”.

Choose columnar layout. The form should look like Figure 68 after formatting.

Save the form as “frmInvoice”.

Figure 68: frmInvoice

Page 26: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 25 of 31

Combining invoice and Invoice body forms

Now we will combine both the invoice forms to create a proper invoice that can be

issued to an employee.

1. Open the “frmInvoice” in design view.

2. Drag the “form footer” down as required.

3. Select the sub-form option as shown in Figure 69. The mouse pointer changes its shape to a form shape. Click the mouse left button at the bottom of the existing fields.

4. MS Access will launch a wizard to help you in defining what you want this form to achieve.

5. We want to use an existing form – “frmInvoiceBody” as the sub-form. So select the options as shown in Figure 70 and click “Next”.

Figure 69: Sub-form control

Figure 70: sub-form selection

Figure 71: connection between the two forms

6. The next screen, as shown in Figure 71, allows us to define the relationship between the main form, and what will be displayed in in the sub form.

7. Click “Finish” to see the updated invoice form.

Note: You have to delete unnecessary text boxes, sub-form navigation and format fields as required.

Your output should look like Figure 60.

Page 27: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 26 of 31

Challenge Task – 03

Mr. Mudusu has to pay salaries to his employees. You have to create a form – frmTimeSheet, to enable his employees to enter their work hours. You also have to create another form – frmPaySlip, which enables Mr. Mudusu to review and calculate the money to be paid. Screenshots of both the forms are given in Figure 72 and Figure 73.

Create these two forms and enter a minimum of 1 timesheet per employee.

Figure 72: Timesheet entry form

Hints:

Use tblTimeSheet and tblEmployee.

Move the fields around to get the desired format.

Hints:

Create a Payslip Body query.

Choose all the fields from tblTimeSheet.

Two calculated fields-Hours worked (DateDiff function can be used) and line total (Hours worked multiplied by hourly rate $18.70) are required in the query.

Create payslip body form and payslip form.

Combine both the forms.

Figure 73: Payslip form

Page 28: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 27 of 31

Creating a Navigation Form

You may have seen so many business management applications. They all have a simple navigation (home) screen, which lists all the functions available to the user in one location. Let us create a navigation screen for our application so that it looks professional. This is made easy with office 2010 navigation forms. Follow the procedure below to create your navigation form.

Figure 74: Navigation Selection

1. Select the “Horizontal Tabs” navigation structure as shown in Figure 74.

2. MS Access will open the navigation form in

Layout view. 3. Add all the tabs as shown in Figure 75. 4. Change the view to design view. 5. Update the form header to reflect the

application under development. 6. Enable the property sheet. See Figure 46 for

help.

Figure 75: Navigation Tabs added

7. Select the tab-“Update Customer”

8. Choose “Data” tab in the

property sheet.

9. Set the navigation target to “frmUpdateCustomer” as shown in Figure 76.

Figure 76:set the navigation target

10. Repeat the same process and link individual tabs with forms as listed below: a. Update Card - frmUpdateCard b. Update Employee – frmUpdateEmployee c. Time Sheet Entry – frmTimeSheet d. Payslip – frmPaySlip e. Sales Entry - frmSalesOrder f. Invoice Generation – frmInvoice

11. Save the form as “Navigation Form”

Page 29: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 28 of 31

12. View the “Navigation Form” in form view and you will see all the tabs working. A

sample screenshot is shown in Figure 77.

Figure 77: Navigation form

Page 30: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 29 of 31

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 Federation University 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.”

Assignment Submission

Save your database file and the word document with partners’ ID numbers.

For example, my number is “ubs30045454” and my partner’s number is “ubs30012345”. Our database file name is going to be – ubs30045454-ubs30012345.accdb and our report file name is going to be - ubs30045454-ubs30012345.docx.

Create a Single Zip file, and submit your assignment zip file through Moodle Shell.

Should you need help with the Moodle shell please speak with your tutor as offline submissions will not be accepted.

****** GOOD LUCK ********

Page 31: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 30 of 31

Check List

1. Database name - Assignment Partners’ student Numbers

2. Table Creation -

a. 6 tables created

b. Fields defined

c. Data types defined

d. Field descriptions added

e. Field properties set

3. Relationships

a. Relationship between table TimeSheet and table Employee

b. Relationship between table SaleHeader and table Employee

c. Relationship between table SaleHeader and table Customer

d. Relationship between tblLineItem and table SaleHeader

e. Relationship between tblLineItem and table Card

4. Data entry – Appropriate and accurate data entered

Minimum 10 records in each table.

5. Update Employee form created.

6. Challenge Task 01 addressed and two forms created.

7. Sales data entry form created and formatted

a. Master form created

b. Sub-form created

c. Forms combined

d. Combined form updated to meet the requirements)

8. Challenge task 02 addressed. Sales data entry form looks like

Figure 40.

Page 32: School of Business · Generate a Payslip (Challenge Task) BUACC5937 June 14 Page 3 of 31 Database specification and requirements The assignment to be undertaken involves: 1. Designing

BUACC5937 June 14 Page 31 of 31

9. Invoice form created and formatted

a. Invoice body query created

b. Invoice header query created

c. Invoice body form created

d. Invoice header form created

e. Forms combined

f. Combined form updated to meet the requirements

10. Challenge task 03 addressed. Both, Employee Timesheet entry

form and Payslip form created.

11. Navigation form created

a. Six tabs created and linked to appropriate forms.

b. Form header updated as required.

12. Documentation (written report)

a. Executive Summary

b. Table of Contents

c. Introduction to the assignment

d. Theory aspects of Relational databases, including but not

limited to the concepts of primary key, foreign key, and

normalisation.

e. Business aspects of the assignment, including but not

limited to the need for a computerised database over paper

based ledgers.

f. Step by step explanation for completing the challenging

tasks 1, 2, and 3.

g. Issues faced in completing the challenging tasks.

h. Issues faced in completing the whole assignment including

but not limited to the group dynamics.

i. References - APA Style formatting.

j. Formatting

k. Peer review of the assignment before submission.