Creating a Business Invoice System

Similar documents
Microsoft Office 2010

Creating a Database in Access

Access Tutorial 1 Creating a Database

Merging Labels, Letters, and Envelopes Word 2013

Excel Tutorial. Bio 150B Excel Tutorial 1

Creating Tables ACCESS. Normalisation Techniques

Microsoft Excel v5.0 Database Functions

Using Word 2007 For Mail Merge

Microsoft Access Basics

July 29, 2010 Revision 5

BIGPOND ONLINE STORAGE USER GUIDE Issue August 2005

Click on various options: Publications by Wizard Publications by Design Blank Publication

Microsoft Excel 2013: Using a Data Entry Form

Note: Before E-Z Mail can be installed; Microsoft Outlook or Lotus Notes must be installed on your system.

Microsoft Word 2011: Create a Table of Contents

Creating tables of contents and figures in Word 2013

ITS Training Class Charts and PivotTables Using Excel 2007

ProSoftMod Commission Report Documentation

Introduction to Microsoft Access 2010

How to Format a Spreadsheet. provided by the OpenOffice.org Documentation Project

Introduction to Microsoft Access 2013

Microsoft Access 2007 Advanced Queries

Excel 2007 A Beginners Guide

BulkSMS Text Messenger Product Manual

Setting up a basic database in Access 2007

Introduction to Microsoft Access 2003

MICROSOFT ACCESS 2003 TUTORIAL

Setting Up Outlook on Workstation to Capture s

Adobe Acrobat X Pro Creating & Working with PDF Documents

Mail Merge (Microsoft Office 2010)

Scan Physical Inventory

Mail Merge Microsoft Word and Excel Queries Scott Kern Senior Consultant

Mail Merge Creating Mailing Labels 3/23/2011

MS Access Lab 2. Topic: Tables

MAIL MERGE TUTORIAL. (For Microsoft Word on PC)

ING USING HOTMAIL

Setting up a basic database in Access 2003

This web-based report provides information for single funds centers. The report can be run for one funds center or multiple single funds centers.

MS WORD 2007 (PC) Macros and Track Changes Please note the latest Macintosh version of MS Word does not have Macros.

Downloading Your Financial Statements to Excel

Working with sections in Word

Excel 2003 A Beginners Guide

Access Tutorial 1 Creating a Database. Microsoft Office 2013 Enhanced

Excel macros made easy

Creating Survey Forms from a Word Table

Access Tutorial 2: Tables

Getting Started with Access 2007

Integrated Invoicing and Debt Management System for Mac OS X

ECDL. European Computer Driving Licence. Spreadsheet Software BCS ITQ Level 2. Syllabus Version 5.0

Guide to Using Outlook Calendar for Meeting Arrangements

Excel Pivot Tables. Blue Pecan Computer Training Ltd - Onsite Training Provider :: :: info@bluepecan.co.

Integrating Microsoft Word with Other Office Applications

Six Steps to Completing a Mail-Merge

Using an Access Database

Sample Table. Columns. Column 1 Column 2 Column 3 Row 1 Cell 1 Cell 2 Cell 3 Row 2 Cell 4 Cell 5 Cell 6 Row 3 Cell 7 Cell 8 Cell 9.

Access Part 2 - Design

Introduction to Visio 2003 By Kristin Davis Information Technology Lab School of Information The University of Texas at Austin Summer 2005

ACCESS 2007 BASICS. Best Practices in MS Access. Information Technology. MS Access 2007 Users Guide. IT Training & Development (818)

How To Understand The Basic Concepts Of A Database And Data Science

Mailing lists process, creation and approval. Mailing lists process, creation and approval

Excel basics. Before you begin. What you'll learn. Requirements. Estimated time to complete:

Internet Explorer 7. Getting Started The Internet Explorer Window. Tabs NEW! Working with the Tab Row. Microsoft QUICK Source

Microsoft Excel Introduction to Microsoft Excel 2007

Lesson 07: MS ACCESS - Handout. Introduction to database (30 mins)

Microsoft Word 2010 Tutorial

Word 2010: Mail Merge to with Attachments

USING THE STUDENT RECORD SYSTEM A GUIDE FOR PERSONAL TUTORS

Installing a Browser Security Certificate for PowerChute Business Edition Agent

Creating a table of contents quickly in Word

Automated Inventory System

QuickStore Mobile Counting

Reviewing documents with track changes in Word 2013

Instructions for creating a data entry form in Microsoft Excel

WHAT S NEW IN WORD 2010 & HOW TO CUSTOMIZE IT

Microsoft Word 2013 Tutorial

Microsoft Access Creating Filters and Tables

2010 Outlook Web App Client Overview

TheFinancialEdge. Configuration Guide for General Ledger

Use Find & Replace Commands under Home tab to search and replace data.

Select the Crow s Foot entity relationship diagram (ERD) option. Create the entities and define their components.

Using PowerPoint Short Course

Word basics. Before you begin. What you'll learn. Requirements. Estimated time to complete:

Vodafone PC SMS (Software version 4.7.1) User Manual

LOYEX TRADING STATION

Job Streaming User Guide

AFN-FixedAssets

Statgraphics Getting started

Using Microsoft Access

Introduction to Word 2007

3. Locate the different selections of Styles from the Home Tab, Styles Group

Microsoft Word Mail Merge

Doña Ana County, NM Map Help

Creating tables in Microsoft Access 2007

Microsoft Access 2010 Part 1: Introduction to Access

Microsoft Word 2013: Mail Merge

quick start guide A Quick Start Guide inflow Support GET STARTED WITH INFLOW

Customer admin guide. UC Management Centre

CHRIS User Guide: Dated Information and Date Tracking

To launch the Microsoft Excel program, locate the Microsoft Excel icon, and double click.

TheFinancialEdge. Journal Entry Guide

Transcription:

Creating a Business Invoice System Chapter 10 To fully understand the value of relational databases you need to create a detailed system. In this chapter you will create an invoicing system for a computer mail order company, PC Direct, which sells computer peripherals through the mail. There are three main sections to the system, customers, products and the sales invoice. In the creation of any database system you should do some careful planning. In general there are four steps that you should undertake. 1 Decide how many tables you think you might need. 2 Decide how the tables will be related to one another. 3 List the fields in each table trying to avoid having the same field in more than one table. Decide which fields will be the PRIMARY KEY and FOREIGN KEY fields to link the tables. 4 Decide what forms and/or reports (or printouts) are required. In the case of PC Direct an initial TABLE RELATIONSHIP diagram might be: Customers Invoice Products Many to Many Link The CUSTOMERS to INVOICE section of this structure forms a ONE TO MANY relationship. The one customer can have MANY invoices sent to them over time, but there will always be ONE customer on each invoice. So the customer table is the ONE side of the relationship and the INVOICE is the MANY side. We can set a relationship to link these two tables. There is a problem with the connection between the INVOICE and the PRODUCTS tables. The one invoice can contain many products and the one product can be included in many invoices. A relational database cannot cater for a MANY TO MANY relationship as you cannot set multiple PRIMARY or FOREIGN KEY fields in the one relationship. A further problem exists, one invoice might contain a sale of 5 of a particular item, the next invoice might contain a sale of 2 of the same item. The company needs a way of adding these sales so that it knows how many items it has sold. So this initial TABLE RELATIONSHIP will need modification. The easiest solution to these problems is to add a table between INVOICE and PRODUCTS. This table can store every item sold by the company as a single record allowing the company to keep track of every item sold. The new table can also provide data to the INVOICE table. Guided Computer Tutorials 2004 10-1

Learning Microsoft Access So a revised TABLE RELATIONSHIP diagram becomes: Customers Invoice Items Sold Products The ONE invoice can have MANY items sold within it. The ONE product can be sold MANY times. By adding the LINE ITEMS table to the system a series of ONE TO MANY relationships have been created and a relational database system can accommodate these. The next step is to decide on the fields to be placed in each table. The following TABLE STRUCTURE diagram shows one possibility. Remember, we do not want to store data more than once (except for PRIMARY KEY or FOREIGN KEY fields). Customers Invoice Line Items Products Customer ID Invoice No Invoice No Product ID Title Customer ID Product ID Product Name First Name Date Qty Sold Cost Price Surname Retail Price Organisation Instock Street Reorder Number Suburb Location State Postcode Phone Fax The PRIMARY KEY and FOREIGN KEY fields need to be considered. Notice in the previous diagram that CUSTOMER ID is used to link the CUSTOMERS and INVOICE tables, INVOICE NO is used to link the INVOICE and LINE ITEMS tables and PRODUCT ID is used to link the LINE ITEMS and PRODUCTS table. The INVOICE table is not directly linked to the PRODUCTS table, it will obtain values from the PRODUCTS table via the LINE ITEMS table. The final consideration in the planning is what reports will be required. The following diagram shows some of the reports that could be made from the various tables. We will create some of these reports in the next chapter. Customers Invoice Items Sold Products Customer List Invoice Item Lists Product List Mailing Labels Monthly Totals Item Totals 10-2 Guided Computer Tutorials 2004

Creating a Business Invoice System 10 Loading the Sample File 1 Copy the CHAPTER 10 folder from the ACCESS SUPPORT FILES to your ACCESS STORAGE folder. Refer to pages 2-1 and 2-2 if you have forgotten how to do this. 2 Load Microsoft Access and click on the OPEN button in the toolbar, or close the current file and click on the OPEN button in the toolbar. 3 Access your ACCESS STORAGE folder and open the CHAPTER 10 folder. 4 Open the CHAPTER 10 file. 5 The database has two tables, CUSTOMER DETAILS which stores data about the company s customers and PRODUCT DETAILS which stores a list of the products that the company markets. 6 Open each table in turn in DESIGN VIEW. Notice that, in the CUSTOMER DETAILS table, the CUSTOMER ID has been set to the PRIMARY KEY field. In the PRODUCT DETAILS table the PRODUCT ID field has been set as the PRIMARY KEY field indicated by the key symbol next to it. Close the tables. Creating the Invoice Table A table is required to store details every time an invoice is sent. This table simply records the INVOICE NUMBER, the CUSTOMER ID and the DATE of the purchase. The links that we make to the other tables will display other details such as product name and retail price. 1 In the TABLES frame of the DATABASE WINDOW, click on the NEW button. 2 In the NEW TABLE dialogue box, select DESIGN VIEW followed by OK. 3 Enter the FIELD NAME: Invoice No Tab to the DATA TYPE cell and set it to AUTONUMBER. This will tell the program to provide a new number every time an invoice is created so no two invoices will ever have the same number. 4 Tab to the DESCRIPTION cell and enter: Provide a unique number for each invoice. 5 In the FIELD PROPERTIES section set the FORMAT box to 00000. This will set the format of each number to five digits, for example, 00001, 00002, etc. 6 Click back in the FIELD NAME cell (or press the F6 key) and click on the PRIMARY KEY button in the toolbar to set the INVOICE No field as the PRIMARY KEY. Refer to the diagram at the top of the next page. NB: The PRIMARY KEY will index the table so that it is listed in INVOICE NO order. Guided Computer Tutorials 2004 10-3

Learning Microsoft Access 7 Click in the second FIELD NAME cell and enter the field name: Customer ID as a TEXT field, with a FIELD SIZE of 10 and a DESCRIPTION: 8 Set the third FIELD NAME cell to: Date with a DATA TYPE set to DATE/ TIME, a FORMAT set to SHORT DATE and a DESCRIPTION: Identity code for each customer Records the date the invoice was issued 9 Save the table as: INVOICE DETAILS 10 To allow for linking of tables we should enter some test data which can be deleted later. Set the screen to DATASHEET VIEW, press the tab key to set the cursor in the CUSTOMER ID field and enter the following data: C0002 4 Mar 2005 C0003 5 Mar 2005 The AUTONUMBER command enters the INVOICE No for you and it was formatted to 5 digits. 11 Close the table. 10-4 Guided Computer Tutorials 2004

Creating a Business Invoice System 10 Creating the Line Items Table The LINE ITEMS table will record each line of the invoice. It will have two main purposes: (A) to list each product sold as a separate record so that the company can calculate monthly sales and carry out stock checks. (B) to provide product data to the invoice. If you look at the diagram at the centre of page 10.2 you will see that the PRODUCTS table is not directly connected to the INVOICE table so some data, such as Product Name and Retail Price, will need to be linked to the LINE ITEMS table via a relationship to the PRODUCTS table so that the INVOICE can display them. 1 In the TABLES frame of the DATABASE WINDOW click on the NEW button. 2 Select DESIGN VIEW in the NEW TABLES dialogue box and select OK. 3 In the first FIELD NAME box, enter INVOICE NO, set its DATA TYPE to NUMBER, its FORMAT to 00000, its INDEXED to YES (DUPLICATES OK) and its DESCRIPTION to: The invoice number of the sale NB: Indexing turned on will set the table to list all the invoice numbers in order. The DUPLICATES OK is necessary because the one invoice might have several different products sold and these need to be in separate records. 4 In the second FIELD NAME cell enter PRODUCT ID. Set it to a TEXT field with a FIELD SIZE of 10, INDEXED set to NO and a DESCRIPTION: The product code of the product purchased Guided Computer Tutorials 2004 10-5

Learning Microsoft Access 5 In the third FIELD NAME cell enter: Qty Set it to a CURRENCY field, with a FORMAT of GENERAL NUMBER, DECIMAL PLACES 0 and add the DESCRIPTION: The number of items of the product purchased. 6 Save the table as LINE ITEMS. Enter No to the PRIMARY KEY warning. A PRIMARY KEY field is not needed for this table, it will be linked to PRIMARY KEY fields in other tables through its FOREIGN KEY fields INVOICE NO and PRODUCT ID. 7 Set the screen to DATASHEET VIEW and enter the following sample data, pressing the tab key after each entry: 1 P0002 5 1 P0007 3 1 P0008 2 2 P0011 2 2 P0003 4 8 Close the table. Creating the Relationships To set up the invoice system the relationships between the tables must be set. This is the most critical part of the database system. 1 Click on the RELATIONSHIPS button in the main toolbar. 2 In the SHOW TABLE dialogue box, double click on the CUSTOMER DETAILS table to add it to the RELATIONSHIPS dialogue box, then double click on the INVOICE DETAILS table, followed by the LINE ITEMS table, followed by the PRODUCT DETAILS table. 3 Close the SHOW TABLE dialogue box and move the CUSTOMER DETAILS, LINE ITEMS and PRODUCT DETAILS tables down by about 2 centimetres. 10-6 Guided Computer Tutorials 2004