Introduction to Queries

Similar documents
Learning Microsoft Word By Greg Bowden. Chapter 10. Drawing Tools. Guided Computer Tutorials

Introduction to Microsoft Excel

Access - Introduction to Queries

Creating User-Friendly Databases

Access Groups. Collect and Store. Text Currency Date/Time. Tables Fields Data Type. You Your Friend Your Parent. Unique information

SECTION 4 USING QUERIES. What will I learn in this section?

Word 2007 Tables Part 2

Microsoft Access 2013

Access Groups. Collect and Store. Text Currency Date/Time. Tables Fields Data Type. You Your Friend Your Parent. Unique information

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

Navigate to Cognos Cognos Analytics supports all browsers with the exception of Microsoft Edge.

Access Groups. Collect and Store. Text Currency Date/Time. Tables Fields Data Type. You Your Friend Your Parent. Unique information

Coordinator of Education and Training Programs

Quick Guide FAST HR. For more resources, including a guide on FAST HR codes, visit # Instructions Screenshot

Making an entry into the CIS Payments workbook

Using Microsoft Access

Microsoft Access 2010

UNIT ONE: The Worksheet. Workbook Window Excel Worksheet Fill handle Automatic fill Column widths Opening a file Saving a file

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

Day : Date : Objects : Open MS Excel program. Subject : * Open Excel application. Select : start. Choose: programs. Choose : Microsoft Office

ADPRO FastTrace 2 USER GUIDE. Provided By:

The following instructions cover how to edit an existing report in IBM Cognos Analytics.

Microsoft Access 2013

Microsoft Access 2013

Introduction to Microsoft Access

IT ACADEMY LESSON PLAN

Housekeeping...1 Introduction...1 Using folders...1 Archiving s...8

Using Mapmaker s Toolkit. In this tutorial, you will learn the following basic elements of Mapmaker s Toolkit:

1 Course Tallies and Lists with Designations

Module 5. Databases. Astro Computer Training. Page 1

Using Microsoft Access

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

2. Key the titles in cells A1 to D1, adjust to size 12, click on the bold button, and format with an underline.

Introduction. Inserting and Modifying Tables. Word 2010 Working with Tables. To Insert a Blank Table: Page 1

SOFTWARE SKILLS BUILDERS

Creating a Crosstab Query in Design View

NVU Web Authoring System

Using the Filter, Field Sets, and Sort Order Menus

Customizing Ribbon with New Main Tab. 1 of 8

Adding and Editing Chapter and Adviser Information Logging in for the first time (Existing chapters)... 2

Introduction to Microsoft Word

Objective: Class Activities

Excel. Spreadsheet functions

EXCEL BASICS: MICROSOFT OFFICE 2010

Links to Activities ACTIVITY 1.1. Links to Activities Links to Activities

Creating Your Electronic Portfolio With Adobe Acrobat 7 (2008)

Study Guide. PCIC 3 B2 GS3- Key Applications-Excel. Copyright 2010 Teknimedia Corporation

Opening a Document: Printer Selection:

Excel Main Screen. Fundamental Concepts. General Keyboard Shortcuts Open a workbook Create New Save Preview and Print Close a Workbook

EXCEL BASICS: MICROSOFT OFFICE 2007

Microsoft Access 2010

sohodox Quick Start Guide

SPREADSHEET (Excel 2007)

Getting Started with OrigaMaster 5. OrigaLys. Electr Chem

Budget Exercise for Intermediate Excel

Etarmis. LITE User Guide

MICROSOFT EXCEL TUTORIAL HANDOUT

Word 3 Microsoft Word 2013

COGNOS Multiple Queries

Finance Systems Finance. PowerBudget. Learner Guide for FedUni Staff

Making and Editing a Table in Microsoft Word 2007

Microsoft Excel Microsoft Excel

Information Warehouse - Report Studio

Spreadsheet EXCEL. Popular Programs. Applications. Microsoft Excel. What is a Spreadsheet composed of?

Day : Date : Objects : Open MS Excel program * Open Excel application. Select : start. Choose: programs. Choose : Microsoft Office.

Microsoft Excel Level 1

PA Payroll Exercise for Intermediate Excel

Scenario Step-by-Step Guide

A CREATE AND UPDATE AN UNRESOURCED PROJECT USING ASTA POWERPROJECT PAUL EASTWOOD HARRIS. 2 nd EDITION. 2-day training course

Adobe Acrobat 5.0. Overview. Internet & Technology Training Services Miami Dade County Public Schools

Tutorial 2. Building a Database and Defining Table Relationships

What s New in Cognos. Cognos Analytics Participant s Guide

Excel Template Instructions for the Glo-Brite Payroll Project (Using Excel 2010 or 2013)

Introduction to INFOASSIST Training Course Manual

Astra Scheduling Grids

SharePoint: Fundamentals

Presenter: Susan Campbell Wild Rose School Division

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

Cell Basics. Introduction

SharePoint: Fundamentals

Astra Scheduling Grids

Excel Tables and Pivot Tables

Microsoft Office Excel 2003

Click the buttons in the interactive below to learn how to navigate the Access window.

Creating Automated Dashboard Excel 2013 Contents

Creating a Text Frame. Create a Table and Type Text. Pointer Tool Text Tool Table Tool Word Art Tool

Microsoft Word 2013 Working with tables

TimeSaver Training - Employee - Hourly View Timecard

Preview New Features of Office 2007 Programs

Using Microsoft Access

Switchboard. Creating and Running a Navigation Form

MS Excel Henrico County Public Library. I. Tour of the Excel Window

Reporting. Guide: Variable. nightly.

Microsoft Excel 2010

Module 4 : Spreadsheets

Introduction to Microsoft Access 2016

download instant at

NYLearns Curriculum Administration:

Using Numbers, Formulas, and Functions

Add notes to a document

Transcription:

Learning Microsoft Access 2007 By Greg Bowden Chapter 3 Introduction to Queries Guided Computer Tutorials www.gct.com.au

PUBLISHED BY GUIDED COMPUTER TUTORIALS PO Box 311 Belmont, 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.

Introduction to Queries Chapter 3 Queries allow you to ask questions of your database. You can combine data from different tables, permanently find or sort data, do calculations or produce interactive dialogue boxes to allow a user to enter search data. There are many different types of Queries, in this chapter you will be introduced to the most common type, SELECT QUERIES. A sample database has been prepared for you. It records employee information in two tables. One table records the employee s personal details, the second table records the employee s pay details. The following diagram summarises the structure of the two tables. Personal Details Pay Details Employee ID Employee ID First Name Position Last Name Section Address Weekly Hours Pay Rate Notice that the field EMPLOYEE ID is present in both tables. This field is called the PRIMARY KEY and it enables two tables to be linked so that data can be used from both of them in the Query. Loading the Sample File 1 Load Microsoft Access and click on the OPEN icon in the OFFICE BUTTON or QUICK ACCESS TOOLBAR. 2 Access the CHAPTER 3 folder of the ACCESS 2007 SUPPORT FILES and click on the CHAPTER 3 WAGES file. 3 Click on the arrow next to the OPEN button and select OPEN READ-ONLY. Guided Computer Tutorials 2008 3-1

Learning Microsoft Access 2007 4 Click on the OFFICE BUTTON, highlight SAVE AS and select ACCESS 2007 DATABASE. 5 Access your STORAGE folder and save the database as: CHAPTER 3 WAGES 1. 6 Turn off the SECURITY ALERT bar if you wish Looking at the Tables 1 Open each of the two tables in turn to become familiar with the data stored in them. 2 Close the tables by clicking in their close boxes. Creating a Query 1 Open the CREATE tab in the RIBBON and click on the QUERY DESIGN icon to start the query. 2 The QUERY design screen is opened with the SHOW TABLE dialogue box displayed. 3-2 Guided Computer Tutorials 2008

Introduction to Queries 3 3 Before the Query can be constructed the tables used by the Query need to be set. 4 Click on the PERSONAL DETAILS table followed by the ADD button to add it to the Query. 5 Click on the PAY DETAILS table and ADD it to the Query frame. 6 Close the SHOW TABLE dialogue box by clicking in its close box. Guided Computer Tutorials 2008 3-3

Learning Microsoft Access 2007 A Linking the Tables In order to create a query on multiple tables, the tables needed to be linked together using the PRIMARY KEY fields. In this case the EMPLOYEE ID field is present in both tables and it has been set as the PRIMARY KEY field in each table. The link between the tables has been created for you. NOTE If the LINK or (RELATIONSHIP) line is not present in your tables, click on the EMPLOYEE ID field in the PERSONAL DETAILS table and drag the field over the EMPLOYEE ID field in the PAY DETAILS table. B Building the Query Let s create a query that displays the employee s name, weekly hours and pay rate. 1 Move the pointer over the FIRST NAME field in the PERSONAL DETAILS table. Hold down the mouse button, drag the field to the first field cell in the query. 2 Notice that the table that the field came from is listed in the TABLE row of the query. 3-4 Guided Computer Tutorials 2008

Introduction to Queries 3 3 Drag the LAST NAME field in to the second FIELD cell in the query. 4 Move the pointer over the WEEKLY HOURS field in the PAY DETAILS table and drag it into the third field cell in the query. 5 Double click on the PAY RATE field. This is another way of inserting a field into the next column of a query. Guided Computer Tutorials 2008 3-5

Learning Microsoft Access 2007 C Looking at the Query 1 Click on the VIEW icon at the left of the DESIGN tab of the RIBBON (not the arrow at the base of the icon). 2 The screen changes to DATASHEET VIEW showing data from both tables. 3 Return to DESIGN VIEW by clicking the arrow at the base of the VIEW icon in the RIBBON and selecting DESIGN VIEW. D Adding a Calculation Field We can work out how much pay each employee receives by adding a calculation field in the fifth query field cell. 1 Click in the fifth field cell (next to PAY RATE). 2 We could type the formula directly into the cell, however, the formula will not fit and it becomes difficult to see. To overcome this problem we can zoom in on the cell. Hold down the SHIFT key and press the F2 key to zoom the cell. 3-6 Guided Computer Tutorials 2008

Introduction to Queries 3 3 Enter: Total Pay: [Weekly Hours] * [Pay Rate] Pay Rate field in square brackets. Multiplication sign. Weekly Hours field in square brackets. Name of the calculation field followed by a colon (:) NOTE: i The calculation field name needs the colon symbol (:) directly after the field name. ii iii Fields used within calculation fields are enclosed in square brackets []. Check that you have typed the field names correctly. 4 Select OK to accept the formula and it is placed in the FIELD cell. Guided Computer Tutorials 2008 3-7