learning microsoft access 2007 - introduction

36
Guided Computer Tutorials By Greg Bowden

Upload: guided-computer-tutorials

Post on 13-Nov-2014

9.572 views

Category:

Documents


1 download

DESCRIPTION

Sample pages from Chapter 1 of Learning Microsoft Access 2007 by Greg Bowden which introduces the basics of setting up a Microsoft Access database, including setting a table, defining field types, entering data and editing data,

TRANSCRIPT

Page 1: Learning Microsoft Access 2007 - Introduction

Guided Computer Tutorials

Learning®

®

2007

By Greg Bowden

Page 2: Learning Microsoft Access 2007 - Introduction

PUBLISHED BY

GUIDED COMPUTER TUTORIALSPO Box 311Belmont, Victoria, 3216, Australia

www.gct.com.au

© Greg Bowden

This product is available in Single or Multi User versions.

Single-user versions are for single person use at any particular time, just as a single text book would be used. If you intend to use the notes with multiple students the single user version should be upgraded to the multi-user version.

Multi-user versions allow the school or institution to print as many copies as required, or to place the PDF files on the school network, intranet and staff laptops. A certificate of authentication is provided with multi-user versions. Bookmarks provide links to all headings and sub-headings, and individual chapters are provided.

First published 2008

ISBN: 1 921217 52 9 (Module 1) 1 921217 53 7 (Module 2) PDF document on CD-ROM

Every effort has been made to ensure that images used in this publication are free of copyright, but there may be instances where this has not been possible. Guided Computer Tutorials would welcome any information that would redress this situation.

Page 3: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials, 2008 C-1

Learning Microsoft Access 2007

Module 1 Contents

Chapter 1: Introduction to Microsoft AccessGetting Started With Microsoft Access ................................................1-2Starting a New Blank Database .............................................................1-3The Database Screen ...............................................................................1-4Creating a Table .......................................................................................1-4

Entering a Text Field ......................................................................1-5Setting the Field Properties ...........................................................1-7Entering More Text Fields .............................................................1-7Entering a Date Field .....................................................................1-8Inserting Number Fields ...............................................................1-9Saving the Table ............................................................................1-10

Entering a Record ..................................................................................1-11Adjusting the Columns .........................................................................1-12Adding Extra Records ...........................................................................1-14Changing the Data ................................................................................1-15

Changing the Contents of a Field ..............................................1-15Adding New Records ...................................................................1-16Deleting a Record .........................................................................1-16

Printing the Database ...........................................................................1-17Previewing the Database .............................................................1-17The Page Setup ..............................................................................1-18

The Record Navigation Buttons...........................................................1-19Finishing a Microsoft Access Session .................................................1-20Databases Assignment 1 ............................................................. 1-22

Page 4: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials, 2008C-2

Learning Microsoft Access 2007

Chapter 2: Processing DataLoading the Sample File .........................................................................2-1Saving the Database ................................................................................2-2File Security ..............................................................................................2-2Sorting Data .............................................................................................2-3

Alphabetical Sorting ......................................................................2-3Numerical Sorting ..........................................................................2-5Chronological Sorting ...................................................................2-5Unsorting ........................................................................................2-6Sorting on More Than One Column ...........................................2-7

Filtering Information ..............................................................................2-8Filter By Selection ..........................................................................2-8Practice Exercise 2.1 ......................................................................2-9Multiple Selection Searches ........................................................2-10One Condition or Another Searches .........................................2-11

Omitting Records ..................................................................................2-13Practice Exercise 2-1 .............................................................................2-14Common Filters.....................................................................................2-14Finding Data ..........................................................................................2-16Using Find Wildcards ...........................................................................2-18Databases Assignment 2 ............................................................. 2-21Databases Assignment 2 Question Sheet ...........................................2-22

Chapter 3: Introduction to QueriesLoading the Sample File .........................................................................3-1Looking at the Tables ..............................................................................3-2Creating a Query .....................................................................................3-2

Linking the Tables ..........................................................................3-4Building the Query ........................................................................3-4Looking at the Query .....................................................................3-6Adding a Calculation Field ...........................................................3-6Sorting the Query ..........................................................................3-8Filtering a Query ..........................................................................3-10Saving the Query ..........................................................................3-11

Page 5: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 20068 C-3

Contents

Opening the Queries Pane ...................................................................3-11Creating a Second Query .....................................................................3-12

Using the Query Wizard .............................................................3-12Adjusting the Query ....................................................................3-15Formatting Fields in a Query .....................................................3-16Combining Text Fields ................................................................3-17Sorting the Query ........................................................................3-19

Interactive Queries ................................................................................3-22Duplicating a Query ....................................................................3-22Setting an Interactive Dialogue Box ..........................................3-23Setting Multiple Interactive Dialogue Boxes ............................3-24

Deleting Queries ....................................................................................3-26Creating Relationships Between Tables ..............................................3-27Databases Assignment 3 ............................................................. 3-29

Chapter 4: Simple FormsLoading the Database .............................................................................4-1Creating a Form .......................................................................................4-2Layout and Form View ...........................................................................4-3Saving the Form .......................................................................................4-3Changing the Form Title ........................................................................4-4Reducing the Field Width ......................................................................4-5Changing the Field Formats ..................................................................4-6Adding a Logo .........................................................................................4-8Using the Form ........................................................................................4-9Tabular Forms ........................................................................................4-11

Duplicating the Form ..................................................................4-11Setting the Tabular Form ............................................................4-12

Databases Assignment 4 ............................................................. 4-14

Chapter 5: Creating More Detailed FormsStarting a New Database.........................................................................5-1Defining the Fields ..................................................................................5-2Deleting the First Table ..........................................................................5-3

Page 6: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials, 2008C-4

Learning Microsoft Access 2007

Starting the Form ....................................................................................5-4Opening the Form in Design View ..............................................5-4Linking the Form to the Data Table ............................................5-5Setting the Grid ..............................................................................5-6

Inserting Fields ........................................................................................5-6Understanding the Handles ...................................................................5-8Saving the Form .....................................................................................5-10Looking at the Form .............................................................................5-10Adding the Remaining Fields ..............................................................5-11Aligning the Fields and Labels ............................................................5-14Adding Rectangles ................................................................................5-17Copying the Rectangle ..........................................................................5-19Changing the Background Colour ......................................................5-21Changing Text Colours .........................................................................5-22Adding a Company Logo .....................................................................5-23

Inserting the Image ......................................................................5-23Entering the Logo Text ................................................................5-24

Entering the Data ..................................................................................5-27Inserting an Image into the Photo Field .............................................5-28Adjusting the Form ...............................................................................5-30Adding Another Record .......................................................................5-31The Value of Forms ...............................................................................5-31Creating a Pop-up List ..........................................................................5-32

Creating a Table to Store the Menu Items .................................5-32Copying the Form ........................................................................5-34Setting the Menu List ...................................................................5-34Formatting the Menu List ...........................................................5-36Entering a Record Using the Menu List ....................................5-38Adjusting the Tab Order ............................................................5-39Entering the Rest of the Record .................................................5-39

Exercise 5.1 .............................................................................................5-40Printing the Field Definitions ..............................................................5-41Databases Assignment 5 ............................................................. 5-42

Page 7: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 20068 C-5

Contents

Chapter 6: Quick ReportsLoading the Sample File .........................................................................6-1Using the Report Wizard ........................................................................6-2

Tabular Reports ..............................................................................6-2Looking at the Report ....................................................................6-4Columnar Reports .........................................................................6-6Setting the Report Into Columns .................................................6-9

The Report Icon .....................................................................................6-11Creating the Report .....................................................................6-11Saving the Report .........................................................................6-12Totals ..............................................................................................6-12Autoformats ..................................................................................6-13Sorting the Data ...........................................................................6-14

Databases Assignment 6 ............................................................. 6-16

Chapter 7: Creating More Detailed ReportsLoading the Database .............................................................................7-1Starting a New Report ............................................................................7-1

Reducing the Height of the Detail Section .................................7-2Displaying the Grid Increments ...................................................7-3Inserting Fields into the Detail Section .......................................7-3Looking at the Report ....................................................................7-7Widening the Grid .........................................................................7-8Adding a Calculation Field ...........................................................7-9Saving the Report .........................................................................7-13

Formatting the Report ..........................................................................7-13Formatting the Fields ...................................................................7-13Formatting the Labels ....................................................................... 7-14Adding a Main Heading ..............................................................7-16Adding the Sub-Heading ............................................................7-17Inserting the Current Date ..........................................................7-18Adding Page Numbers to the Page Footer ................................7-19

Page 8: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials, 2008C-6

Learning Microsoft Access 2007

Some Finishing Touches .......................................................................7-20Adding a Rectangle ......................................................................7-20Inserting a Line .............................................................................7-22

Databases Assignment 7 ............................................................. 7-24

Chapter 8: Creating User-Friendly DatabasesOpening the Sample File ........................................................................8-1Opening the File as an Exclusive file ....................................................8-1The Sections of the Database .................................................................8-2

Tables ...............................................................................................8-2Queries ............................................................................................8-2Forms ...............................................................................................8-2Reports ............................................................................................8-2

The Structure of the Database................................................................8-3Completing the Data Entry Form .........................................................8-3

Inserting a New Record Button ....................................................8-4Inserting a Find Record Button ....................................................8-5Inserting a Delete Record Button .................................................8-7Testing the Buttons ......................................................................8-10

Creating a Main Switchboard Form ...................................................8-12Setting the Grid ............................................................................8-13Setting the Background Colour ..................................................8-14Inserting a Graphic ......................................................................8-14Adding a Button to Open the Data Entry Form ......................8-16Inserting Buttons to Print Reports.............................................8-18Adding an Exit Button .................................................................8-21Adding a Rectangle ......................................................................8-23Adding the Headings ...................................................................8-24Testing the Buttons ......................................................................8-25

Setting the Opening Form ...................................................................8-28Setting a Password .................................................................................8-29Printing the Form ..................................................................................8-30Databases Assignment 8 ............................................................. 8-32

Microsoft Access Project

Page 9: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 20068 C-7

Contents

Module 2 Contents

Chapter 9: Using MacrosLoading the Sample File .........................................................................9-1Looking at the Database .........................................................................9-1Creating the Properties Macros .............................................................9-2

Creating the Rental Properties Macro .........................................9-2Saving the Macro ............................................................................9-5Running the Macro ........................................................................9-5Creating the Sale Properties Macro .............................................9-7Creating the Auction Properties Macro ......................................9-9Testing the Macros .......................................................................9-11

Macros to Open Forms .........................................................................9-12Opening the Data Entry Form ...................................................9-12Opening the Main Switchboard Form ......................................9-14Saving the Macro Group .............................................................9-14Testing the Macros .......................................................................9-15

Assigning Buttons to the Macros ........................................................9-15Switching to the Data Entry Form .............................................9-16Switching to the Main Switchboard Form ................................9-18

Buttons to Display the Report Macros ...............................................9-20The Auction Properties Report Button .....................................9-20The Sale Properties Report Button ............................................9-22The Rental Properties Report Button ........................................9-22The Exit Application Button .......................................................9-23

Setting an Autoexec Button..................................................................9-25Printing the Macro Definitions ...........................................................9-26Databases Assignment 9 ............................................................. 9-28

Page 10: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials, 2008C-8

Learning Microsoft Access 2007

Chapter 10: Reports That Total ItemsLoading the Sample File .......................................................................10-1Creating a Daily Sales Report ..............................................................10-1Adjusting the Report .............................................................................10-5

Adjusting the Report Header ......................................................10-6Adjusting the Date Header and Detail Sections .......................10-8Reducing the Field Widths .........................................................10-9Adjusting the Group Footer ......................................................10-10Adjusting the Report Footer .....................................................10-14Some Final Adjustments ...........................................................10-16

Creating a Second Report ..................................................................10-20Copying the Report....................................................................10-20Altering the Report Header ......................................................10-21Changing the Grouping ............................................................10-21

Practice Exercise 10.1 .........................................................................10-24Databases Assignment 10 ......................................................... 10-25

Chapter 11: Applying Relational Database FeaturesCreating a Relational Database System ..............................................11-1Loading the Sample File .......................................................................11-2Defining the Relationship ....................................................................11-2Completing the Suppliers Form ..........................................................11-6

Setting the Sub-Form Frame ......................................................11-6Setting the Wizard Options ........................................................11-7Adjusting the Sub-Form ..............................................................11-8Looking at the Form ....................................................................11-9

Using the Main Form ..........................................................................11-11Deleting Records ........................................................................11-11Allowing for Cascade Deletes ...................................................11-12Deleting a Supplier .....................................................................11-14Deleting a Product .....................................................................11-15Adding a New Supplier .............................................................11-16

Adjusting the Sub-Form .....................................................................11-18Advantages of Relational Database Systems ....................................11-20Databases Assignment 11 ......................................................... 11-21

Page 11: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 20068 C-9

Contents

Chapter 12: Setting up an Invoice SystemLoading the Sample File .......................................................................12-3

Looking at the Tables ...................................................................12-3Looking at the Forms ...................................................................12-4

Creating the Invoice Table....................................................................12-5Saving the Table .....................................................................................12-7Creating the Relationships ...................................................................12-8

Relating the Customer Details and Invoice Details Tables .....12-9Relating the Invoice Details and Line Items Tables ...............12-11Relating the Line Items and Product Details Tables ..............12-12

Calculating the Amount Sold ............................................................12-14Completing the Invoice Form............................................................12-17

Setting the Table .........................................................................12-17Setting the Default Settings .......................................................12-17Inserting the Invoice Fields .......................................................12-18Inserting the Customers Sub-Form into the Invoice .............12-22Creating the Line Items Sub-Form ..........................................12-25Inserting the Line Items Sub-Form into the Invoice .............12-28Adding a New Invoice ...............................................................12-31

Adding Calculations to the Invoice ..................................................12-32Adding a Calculation Control in the Line Items Sub-Form .12-32Placing the Calculation in the Main Form .............................12-34

Databases Assignment 12 ......................................................... 12-38

Chapter 13: Formatting Invoice SystemsLoading the File .....................................................................................13-1Setting Lookup Values ..........................................................................13-1

Deleting the Customer Relationships ........................................13-1Setting the Customer Lookup Values ........................................13-2Looking at the Customer Lookup Settings ...............................13-5Setting the Products Popup List .................................................13-6Resetting the Customers Relationship ......................................13-8Adjusting the Invoice .................................................................13-10Testing the Invoice .....................................................................13-14

Page 12: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials, 2008C-10

Learning Microsoft Access 2007

Aligning the Invoice Elements ..........................................................13-16Adding a Border to the Invoice .........................................................13-18Adjusting the Sub-forms ....................................................................13-19Adding a Page Break ...........................................................................13-20Setting the Tab Order ..........................................................................13-21Previewing the Form ...........................................................................13-21Using the Invoice .................................................................................13-23Databases Assignment 13 ......................................................... 13-26

Chapter 14: Reporting From Invoice SystemsLoading the Sample File .......................................................................14-1Creating a Total Items Sold Report .....................................................14-1

Starting the Report Wizard .........................................................14-1Making the Total Items Sold Report More Concise ................14-4Formatting the Product Name Footer .......................................14-8Inserting Field Labels ..................................................................14-9Separating the Sections .............................................................14-12Renaming the Report ................................................................14-15

Creating the Monthly Sales Report ...................................................14-16Creating the Monthly Sales Query...........................................14-16Copying the Items Sold Report ................................................14-18Adjusting the Grouping .............................................................14-19Adjusting the Report .................................................................14-20

Creating Mailing Labels .....................................................................14-24Looking at the Mailing Labels ...........................................................14-26Databases Assignment 14 ......................................................... 14-27

Page 13: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 20068 C-11

Contents

Chapter 15: Enhancing Invoice SystemsLoading the Sample File .......................................................................15-1Creating a Customers Data Entry Form ............................................15-1

Creating the Form ........................................................................15-1Adding Buttons to the Form .......................................................15-4Testing the Buttons ......................................................................15-7

Creating a Products Data Entry Form ................................................15-8Creating a Main Switchboard ............................................................15-11Creating a Reports Switchboard ........................................................15-13Creating the Macros ...........................................................................15-14

Macros to Switch to the Different Forms ................................15-14Macros to Preview the Reports ................................................15-16An AutoExec Macro ..................................................................15-17

Setting the Buttons ..............................................................................15-18Adding Buttons to the Main Switchboard Form ....................15-18Adding Buttons to the Invoice Form .......................................15-21Adding Buttons to the Customers and Products Forms .......15-23Adding Buttons to the Reports Switchboard Form ...............15-24

Databases Assignment 15 ......................................................... 15-28

Chapter 16: Useful ToolsLoading the Sample File .......................................................................16-1Enabling Content ..................................................................................16-1Help Features .........................................................................................16-2Creating Form Tabs ...............................................................................16-4

Creating the Form ........................................................................16-4Creating the Tab Controls ...........................................................16-5Placing Fields in the Form Tabs .................................................16-8Looking at the Form Tabs .........................................................16-10Adjusting the Form Tabs ...........................................................16-11Changing the order of the Form Tabs .....................................16-13Adding Another Form Tab .......................................................16-14

The Calendar Control .........................................................................16-15Changing the Form Heading .............................................................16-17

Page 14: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials, 2008C-12

Learning Microsoft Access 2007

Checking for Duplicate Records .......................................................16-18Creating a Duplicates Query ....................................................16-18Using the Duplicates Query ......................................................16-20Setting a Button to Run the Query ..........................................16-21

Trusted Locations ................................................................................16-24Database Templates .............................................................................16-25

Page 15: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 2008 1-1

Chapter

1Introduction to Microsoft AccessData is simply a collection of characters (that is, letters, numbers and symbols) which, on their own, have no particular meaning. When data about a particular topic is stored it is said to be a database. A database allows data to be processed into information, something that can be communicated and understood.

There are two different types of databases:

• thosethatalreadycontaindataandjustallowyoutoobtaininformationfromthem. You are not able to make any changes to the data. These are called CLOSED DATABASES.

• thosethatallowyoutoenterandchangethedataandprocessit.Thesearecalled OPEN DATABASES.

Microsoft Access is an OPEN DATABASE.

Some databases that we use in everyday life are: the telephone book, a dictionary, an atlas, a bus timetable, etc. Data within a database is usually divided into categories or sections, called FIELDS. The fields that the telephone book is divided into are:

Surname, Initials, Street Number, Street Name, Suburb, Telephone Number

These FIELDS can vary in length depending on how much data (characters) needs to be placed into them. For example, an Initials field does not need as much space as a Surname field.

One complete set of fields is termed a RECORD. For example, each subscriber’s details in the phone book is a record. There are over 1 000 000 records in the Melbourne telephone book.

AgroupofrecordsonaparticularsubjectiscalledaFILE.Forexample,thephonebook is divided into two FILES, white pages and yellow pages.

Page 16: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 20081-2

Learning Microsoft Access 2007

Getting Started With Microsoft Access

1 Load Microsoft Access and you should receive the GETTING STARTED WITH MICROSOFT OFFICE ACCESS startup screen.

2 The RECENT DATABASE panel at the right of the window allows you to quickly open recently used files.

NOTE: Once you are familiar with creating Access databases you can use these templates to quickly setup the type of database you require. You can also find templates online using the FROM MICROSOFT OFFICE ONLINE section.

Templates Pane

New Database Button

Sample Database Templates

Recent Database Pane

3 Click on LOCAL TEMPLATES in the TEMPLATES CATEGORIES pane and a range of preset database types are provided.

Page 17: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 2008 1-3

1Introduction to Microsoft Access

Starting a New Blank Database

To learn how to create your own database a database for a bank will be created.

1 Return the TEMPLATES CATEGORIES to FEATURING and click on the BLANK DATABASE icon in the NEW BLANK DATABASE section.

2 The BLANK DATABASE pane will be opened, enter the file name:

Bank Records

and click on the BROWSE icon.

3 Microsoft Access automatically saves your work as you enter data so the program needs to know where to save the file before you create it. Locate your STORAGE folder and click on OK.

4 Click on CREATE to start the database.

Page 18: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 20081-4

Learning Microsoft Access 2007

The Database Screen

The database screen has a number of sections which are labelled in the following diagram.

An Access database is made up of TABLES where you enter the data, QUERIES where you ask questions of the data, FORMS where you make the data easier to view and edit, and REPORTS where you print the data. These sections will be covered in the next few chapters.

Creating a Table

Tables (or lists) are the main way of displaying data in Microsoft Access. All data is stored in tables. The one database can have many different tables, but each table should concentrateontheonesubject.Forexample,theproductsthatacompanysellsorthecustomers that the company has. The ROWS in the table represent the RECORDS of the database. The COLUMNS represent the FIELDS.

Let’s create a database for a bank that records the names, addresses and annual incomes for clients taking out personal loans. The first step in creating a database is to enter the FIELDS (the categories or sections into which the data is divided).

You can type the field names directly into the Work pane area like you would in a spreadsheet. However, usually you will want to set the field types and formats so it is better to enter the table in DESIGN VIEW.

Office Button

The Navigation Pane

Quick Access Toolbar The Ribbon

The Work Pane

Page 19: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 2008 1-5

1Introduction to Microsoft Access

A Entering a Text Field

NOTE: DESIGN VIEW allows you to enter the field names, their data type (for example, text, number, date/time, etc.) and to make comments to remind users about what the field stores.

1 In the DATASHEET tab of the RIBBON click on the arrow at the base of the VIEW button and select DESIGN VIEW.

1 In the DESIGN VIEW screen the table name is displayed in the NAVIGATION pane.

2 You will be asked to save the table, enter the Table Name:

Current Loans

and select OK.

2 In the first FIELD NAME box (or cell) enter the field name:

First Name

and press the TAB key to move the cursor to the DATA TYPE column.

Page 20: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 20081-6

Learning Microsoft Access 2007

3 In the DATA TYPE column you will be provided with the AUTONUMBER TYPE as the program is expecting a record number or code number field. In this case we are creating a simple database so the field will need to be set to TEXT.

NOTE: The comments entered in the DESCRIPTION column are displayed in the status bar at the bottom of the screen when the field is selected. This section of the field definitions is optional and we will leave it out for this first database. You will use this feature in later databases that you create.

4 Notice that there is a down arrow added to the box (or cell). This indicates that there is a drop-down menu available containing a list of other data types to select from.

5 Click on the down arrow and select TEXT.

6 Press the TAB key to The DESCRIPTION column, which allows you to make comments about the field.

Page 21: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 2008 1-7

1Introduction to Microsoft Access

B Setting the Field Properties

At the bottom of the TABLE window there is a section called FIELD PROPERTIES. This allows you to enter detailed settings about a field. If the field size is set to 50 characters it means that the field can store 50 letters, numbers, punctuations, spaces, etc.

C Entering More Text Fields

TEXT fields will be needed for each person’s Last Name, Sex and Address.

For a person’s FIRST NAME field 20 characters will be more than enough so highlight the 255 and replace it with 20.

1 Click in the second FIELD NAME cell (justundertheFIRSTNAMEfield)andenter:

Last Name

press the TAB key to move to the DATA TYPE cell and set it to TEXT.

2 Set the FIELD SIZE box in the FIELD PROPERTIES to 20 characters.

Page 22: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 20081-8

Learning Microsoft Access 2007

NOTE: You can use the arrow keys on the keyboard to move the cursor from cell to cell):

D Entering a Date Field

Fields that contain dates should be set to the DATE/TIME field type.

NOTE: i You can press the first letter of a DATA TYPE to insert it. For example, pressing d will insert DATE/TIME.

ii Access does not like reserved words to be used as field names. So using just DATE as the field name is not recommended.

3 Repeat steps 1 and 2 to enter the following fields:

Sex (field size: 5) Address (field size: 50)

1 In the fifth FIELD NAME cell enter:

Loan Date

TAB to the DATA TYPE cell and set the DATA TYPE to DATE/TIME from the drop -down menu.

Page 23: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 2008 1-9

1Introduction to Microsoft Access

E Inserting Number Fields

Fields that will contain numbers can be set to a number format such as NUMBER or CURRENCY. Calculations can be carried out on the data in number fields.

2 In the FIELD PROPERTIES section, click in the FORMAT box to display its down arrow. Click on the arrow to display the drop-down menu and a series of date formats should be displayed. Select MEDIUM DATE 19-June-07.

1 Click in the sixth FIELD NAME cell and enter:

Income

TAB to the DATA TYPE cell and set it to CURRENCY.

Page 24: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 20081-10

Learning Microsoft Access 2007

F Saving the Table

Microsoft Access automatically saves any records that you enter, however, it does not save modifications to tables, queries, forms, reports or macros. These sections must be saved individually.

2 In the FIELD PROPERTIES section, click in the DECIMAL PLACES box, click on the down arrow to display the drop-down menu and select 2.

3 Insert a field called:

Loan

in the seventh FIELD NAME cell.

4 Set its DATA TYPE set to CURRENCY with 2 decimal places.

Click on the SAVE button in the QUICK ACCESS TOOLBAR to update the table.

Page 25: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 2008 1-11

1Introduction to Microsoft Access

Entering a Record

Once the FIELDS have been defined you are ready to start entering the data. At the moment the screen is in DESIGN VIEW. To enter data the screen must be changed to DATASHEET VIEW.

NOTE: i The box to the left of ‘Carol’ contains the pencil symbol to indicate that you are writing data into the database. Whilst the pencil symbol is displayed, the data in that record is not saved.

ii The asterisk symbol at the start of the next row indicates a new record can be entered. Microsoft Access automatically adds a blank record to the end of the table as you add data.

iii Pressing the TAB key moves the cursor to the next field. The <enter> key can also be pressed or you can use the arrow keys on the keyboard.

iv Holding down the SHIFT key and pressing the TAB key moves the cursor to the previous field. The left arrow key can also be pressed.

v If you make a mistake when entering data, use the I-Beam to highlight the mistake and type in the correction.

1 Click on the arrow at the base of the VIEW button in the DESIGN tab of the RIBBON and select DATASHEET VIEW.

2 In the first cell under FIRST NAME enter:

Carol

then press the TAB key to move the cursor (or insertion marker) to the next field.

Page 26: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 20081-12

Learning Microsoft Access 2007

NOTE: The symbols at the left of the table should have changed to just an asterisk marker. This indicates that RECORD 2 is selected. The pencil symbol has been removed from RECORD 1 indicating that its data has been saved.

Adjusting the Columns

Ifyoulookatthedatayouhavejustenteredyoushouldseethatnotallthedataisdisplayed.Thewidthofthecolumnscanbeadjustedtodisplayallthedata.

1 Move the pointer over the intersection between the FIRST NAME and LAST NAME field headings. The cursor should change to a cross-hair with horizontal arrows indicating that it can be only dragged to the left or right.

3 Enter the rest of the record:

Robinson <tab> F <tab> 142 High Street Richmond 3121 <tab> 3 Sep 2008 <tab> 25500 <tab> 2550 <tab>

2 Hold down the mouse button and drag the mouse to the left by about a centimetresothatthefirstcolumnjustencloses the FIRST NAME heading.

Page 27: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 2008 1-13

1Introduction to Microsoft Access

3 Reduce the width of the SURNAME field by about half a centimetre.

7 You have made changes to the appearance of the table. The data has been saved, butnottheadjustmentstothecolumnwidths.ClickontheSAVEbuttonintheQUICK ACCESS TOOLBAR to save the changes you have made to the table.

4 Move the pointer over the intersection between the SEX and ADDRESS fields and double click the mouse button. This will instruct Access to choose the best fit based on the largest piece of data (in this case the width will be based on the FIELD NAME itself ).

5 Increase the width of the ADDRESS field so that all of the address data is visible.

6 Reduce the width of the LOAN DATE, INCOME and LOAN columns.

Page 28: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 20081-14

Learning Microsoft Access 2007

Adding Extra Records

NOTE: Once you press the TAB key after the LOAN data, the program has automatically saved the second record.

2 Enter the following data using the TAB key to move to each field:

Gary Kane M 8 Newell Road Surrey Hills 3127 4 Sep 2008 32000 3200Paula Douglas F 216 Main Road Clayton 3168 6 Sep 2008 35000 3500

NOTE: You can adjust the width of the columns to best fit to ensure that all the data is displayed.

1 In the second row of the table, enter:

Michael <tab> Smith <tab> M <tab> 79 Charles Court Fitzroy 3065 <tab> 3 Sep 2008 <tab> 28000 <tab> 2800 <tab>

3 The two extra records should be inserted and saved.

Page 29: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 2008 1-15

1Introduction to Microsoft Access

Changing the Data

Now that you have entered some data it can be changed in a number of different ways. Individual FIELDS can be altered, RECORDS can be deleted, new RECORDS can be added, etc.

A Changing the Contents of a Field

Let’sassumethatPaulaDouglashasjustmarriedandshewishestotakeherspouse’sname. You need to change her last name.

NOTE: Double clicking the mouse button with the pointer or I-Beam over the name will also select it.

1 Position the I-Beam at the start of the ‘D’ in the last name: DOUGLAS. Hold down the mouse button and drag the mouse to the right to highlight the entire name.

2 Enter: Mason and ‘Douglas’ will be replaced with ‘Mason’.

Page 30: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 20081-16

Learning Microsoft Access 2007

B Adding New Records

New records can be added at any time. Microsoft Access automatically adds a blank record to the end of a table as you enter data.

C Deleting a Record

Paula Mason has been able to pay back her loan so her details can be removed from the database.

3 Gary Kane has changed his address. Click the pointer at the start of his address (this is another way to highlight a field’s contents). Alter his ADDRESS field to:

33 Rogers Court Malvern 3144

and press the <enter> key to accept the change.

In the fifth row enter:

Allan Smith M 156 Alsop Street Werribee 3030 14 Sep 2008 45000 4500

1 Click on the shaded box to the left of Paula Mason’s record to highlight the record then click on the DELETE icon in the HOME tab of the RIBBON.

Page 31: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 2008 1-17

1Introduction to Microsoft Access

NOTE: Be careful with deleting records. Once a record has been deleted it cannot be retrieved. If you delete a record by mistake it will need to be re-entered into the database.

Printing the Database

Tables are not normally printed. Reports are created to professionally display the data on paper. However, you can print tables so that you have a record of what you have done.

A Previewing the Database

You can look at a screen view of your table before printing.

2 You will receive the DELETE RECORD warning dialogue box telling you that you cannot reverse the delete record process. Click on the YES button and the record will be permanently removed from the database.

1 Click on the OFFICE BUTTON, highlight PRINT and select PRINT PREVIEW.

Page 32: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 20081-18

Learning Microsoft Access 2007

B The Page Setup

3 Print a copy of the table if you wish or click on the CLOSE PRINT PREVIEW icon in the RIBBON to close the preview window.

2 Click on the ZOOM icon in the RIBBON to increase the screen view.

3 Notice that the program has inserted the name of the table as a header, included the date next to it and at the bottom of the screen included page numbers.

1 Click on the LANDSCAPE icon in the RIBBON to so that the table prints across the longer side of the paper.

2 Click on the SIZE icon in the RIBBON and select the PAPER SIZE you will be printing to. It is probably A4,

Page 33: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 2008 1-19

1Introduction to Microsoft Access

The Record Navigation Buttons

When databases become larger, all the records of those databases will not be visible on the screen. The RECORD NAVIGATION BUTTONS at the bottom left of the screen allow you to scroll through the records.

1 Try clicking on the FIRST RECORD, NEXT RECORD, PREVIOUS RECORD and LAST RECORD buttons in turn and the RECORD HIGHLIGHT should move each time.

Previous Record

First Record

Current Record

Next Record

Last Record

Quick Search

New Record

2 Enter: 2 in the CURRENT RECORD box and press <enter>. RECORD 2 will be highlighted.

Page 34: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 20081-20

Learning Microsoft Access 2007

NOTE: i The PAGE UP key on the keyboard sets the cursor to the beginning of a column (field).

ii The PAGE DOWN key sets the cursor to the end of a column.

iii The HOME key sets the cursor to the beginning of a row (record).

iv The END key sets the cursor to the end of a row (record).

Finishing a Microsoft Access Session

Complete this section when you need to finish a session or when your teacher asks you to finish.

3 Enter: Carol in the SEARCH BOX and Carol should be highlighted in the data.

1 Click on the OFFICE BUTTON and select EXIT ACCESS.

Page 35: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 2008 1-21

1Introduction to Microsoft Access

3 You will be returned to the Windows desktop.

NOTE: CTRL+F4 can be pressed to close a table then ALT+F4 can be pressed to close the program.

2 If changes have been made to the table since your last save, you will be asked whether to save the changes. Select YES.

Page 36: Learning Microsoft Access 2007 - Introduction

© Guided Computer Tutorials 20081-22

Learning Microsoft Access 2007

Databases Assignment 1You are required to set up a wages database for a clothing factory. You will be required to create a table, define fields, enter some data, make changes to the data and print the table.

1 Start a new BLANK DATABASE, called ASSIGNMENT 1. Save the table as PAY DETAILS and enter the following fields with the indicated DATA TYPE and DESCRIPTION.

Employee Text Enter the employee’s name Position Text Entertheemployee’sjobtype Weekly Hours Number Enter the hours worked per week Pay Rate Currency Enter the rate of pay per hour Gross Pay Currency Enter the employee’s total pay

2 For the TEXT fields you will need to decide on appropriate FIELD SIZES. For the NUMBER and CURRENCY fields you will need to decide on appropriate FORMATS and DECIMAL PLACES.

3 Enter the following data:

S. Jones Manager 40 $25.00 $1000.00W. Anderson Secretary 35 $18.00 $630.00W. Grace Receptionist 35 $13.50 $472.50G. Seller Machinist (Snr) 38 $17.50 $665.00J. Cope Machinist 38 $14.50 $551.00R. Justin Machinist (App) 38 $7.50 $285.00W. Drapper Weaver 38 $13.50 $513.00W. Freeman Weaver 38 $13.50 $513.00H. Allison Weaver 38 $13.50 $513.00

Printing

1 Adjustthecolumnwidths,checkapreviewofthetablethoroughly,thenprintacopy.

2 Checktheprintoutandmakeanynecessaryadjustments.

3 Maketwoadjustmentstothedata.W.Andersonhasresignedandhasbeenreplaced with R. Nixon. Two employees have had to be laid off due to tough economic times. Delete R. Justin and W. Freeman.

4 Reprint the table and hand in your two printouts for marking.