Microsoft Access Lesson 5 Lexington Technology Center February 25, 2003 Bob Herring On the Web at www.lexington1.net/AdultEd/computer/microsoft_access.htm.

Slides:



Advertisements
Similar presentations
Working with Tables 1 of 5. Working with Tables 2 of 5.
Advertisements

Microsoft Office 2007 Access Chapter 3 Maintaining a Database.
Access Lesson 8 Using Advanced Queries Microsoft Office 2010 Advanced Cable / Morrison 1.
Chapter 5 Creating, Sorting, and Querying a Table
® Microsoft Access 2010 Tutorial 5 Creating Advanced Queries and Enhancing Table Design.
Microsoft Office 2007 Access Chapter 2 Querying a Database.
Access Tutorial 3 Maintaining and Querying a Database
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making.
Querying a Database Using the Select Query Window
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Querying a Database Microsoft Office Access 2003.
1 DB Implementation: MS Access Queries. 2 Outline Access Queries ► Query Creation ► Sorting & Filtering ► Query Types ► Dynamic Query.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 3 Maintaining a Database Using the Design and Update Features of Access.
Chapter 2 Querying a Database
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory Pasewark & Pasewark.
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory.
Chapter 3 Maintaining a Database
Maintaining and Querying a Database Microsoft Access 2010.
Chapter 2 Querying a Database MICROSOFT ACCESS 2010.
Database Applications – Microsoft Access Lesson 9 Designing Special Queries Updated 4/11.
Lesson 31: Querying a Database. 2 Learning Objectives After studying this lesson, you will be able to:  Create, save, and run select queries  Design.
Database Applications – Microsoft Access Lesson 9 Designing Special Queries.
Chapter 1 Databases and Database Objects: An Introduction
DAY 14: ACCESS CHAPTER 1 Tazin Afrin October 03,
Chapter 6 Generating Form Letters, Mailing Labels, and a Directory
Microsoft Access Queries Birgül Kutlu. SORTING AND FILTERING Sorting and filtering allow you to view records in a table in different ways such as: reordering.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 4 BACKNEXTEND 4-1 LINKS TO OBJECTIVES Query Design Query Criteria Modify a Query Using OR.
1 Chapter 7 Query-By-Example by Monica Chan CS157B Professor Lee.
Microsoft Access Lesson 1 Lexington Technology Center February 11, 2003 Bob Herring On the Web at
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. Office Access 2003 Lab 3 Analyzing Data and Creating Reports.
Microsoft Access 2010 Building and Using Queries.
Analyzing Data For Effective Decision Making Chapter 3.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 6 – Designing.
® Microsoft Access 2010 Tutorial 5 Creating Advanced Queries and Enhancing Table Design.
Microsoft Office 2007 Access Chapter 2 Querying a Database.
MS-ACCESS BY SANGEETHA PARTHASARATHY Topics to be covered §Comparing Values in Selection Criteria §Calculating Values in a Query §Changing the appearance.
Microsoft Office 2007 Intermediate© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! With Microsoft ® Office 2007 Intermediate Chapter.
® Microsoft Office 2010 Access Tutorial 3 Maintaining and Querying a Database.
L546 Session 7, IU-SLIS 1 DB Implementation: MS Access Queries & Reports.
Database Systems Microsoft Access Practical #3 Queries Nos 215.
Microsoft Office 2007 Access Chapter 3 Maintaining a Database.
® Microsoft Access 2010 Tutorial 3 Maintaining and Querying a Database.
MS-ACCESS BY SANGEETHA PARTHASARATHY Topics Covered Understanding different types of Queries Creating a Query Creating a Query using a Wizard Changing.
Figure 2.1 The Open dialog box in the Startup window. Cancel button Open dialog box folders on drive C.
COMPREHENSIVE Access Tutorial 3 Maintaining and Querying a Database.
Course ILT Forms and queries Unit objectives Create forms by using AutoForm and the Form Wizard, and add or modify form headers and footers Open and enter.
Database Applications – Microsoft Access Lesson 4 Working with Queries 36 Slides in Presentation.
Reports and Queries Chapter 3 – Access text Reports – Page Queries – Page
What are queries? Queries are a way of searching for and compiling data from one or more tables. Running a query is like asking a detailed question of.
Microsoft Access Lesson 2 Lexington Technology Center February 13, 2003 Bob Herring On the Web at
Pasewark & Pasewark Microsoft Office 2003: Introductory 1 INTRODUCTORY MICROSOFT ACCESS Lesson 4 – Finding and Ordering Data.
® Microsoft Access 2010 Tutorial 5 Creating Advanced Queries and Enhancing Table Design.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 6 BACKNEXTEND 6-1 LINKS TO OBJECTIVES Using the Report Button Using the Report Button Print.
Excel part 5 Working with Excel Tables, PivotTables, and PivotCharts.
Key Applications Module Lesson 22 — Managing and Reporting Database Information Computer Literacy BASICS.
Lesson 4: Querying a Database. 2 Learning Objectives After studying this lesson, you will be able to:  Create, save, and run select queries  Set query.
Creating Advanced Queries and Enhancing Table Design.
Access Queries and Forms. Adding a New Field  To insert a field after you have saved your table, open Access, and open the table  It is easier to add.
1 11 Chapter 7 Action Queries Exploring Microsoft Office Access 2007.
Microsoft Office Access 2010 Lab 3
Maintaining a Database Using the Design and Update Features of Access
Access Chapter 2 Querying a Database.
Querying a Database Using the Select Query Window
Exploring Microsoft Office Access 2010
Creating and Modifying Queries
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Tutorial 5 Advanced Queries and Enhanced Table Design
New Perspectives on Microsoft
Presentation transcript:

Microsoft Access Lesson 5 Lexington Technology Center February 25, 2003 Bob Herring On the Web at

Access Lesson 5 Review of Thursday’s Lesson Designing Forms Formatting Forms ActiveX Controls Creating Subforms 2

Access Lesson 5 Filtering by Form Access provides several ways to filter data To select precise subsets of information, use Filter by Form 3

Access Lesson 5 Filtering by Form Click the Filter by Form button A miniature of the table appears with blanks to enter selection criteria Mini-Table Criteria Tab 4

Access Lesson 5 Filter Toolbar New Object Undo Print Load From Query Spell Check Cut Paste Close Filter Window Apply Filter Help Database Window Clear Grid Save As Query Copy Format Painter 5

Access Lesson 5 Filtering by Form Enter the search criteria in the form Click the Apply Filter button Like “*Manager*” 6

Access Lesson 5 Filtering by Form When the filter is applied, all contacts who have “Manager” anywhere in their title are displayed Filter Applied 7

Access Lesson 5 Filtering by Form Mathematical criteria can also be applied >100 8

Access Lesson 5 Filtering by Form When the filter is applied, all products with more than 100 units in stock are displayed 9

Access Lesson 5 Applying More than One Filter More than one criterion can be used in the filter Add other criteria in the other blanks in the mini-table This is the “AND” logical condition >100 Condiments 10

Access Lesson 5 Applying More than One Filter When the filter is applied, all condiments with more than 100 units in stock are displayed 11

Access Lesson 5 Using the “OR” Property Click the “Or” tab at the bottom of the window This opens a new window with a new mini-table Enter criteria as before Grains/ Cereals Or Tab 12

Access Lesson 5 Using the “OR” Property When the filter is applied, all condiments with more than 100 units in stock and all grains/cereals products are displayed 13

Access Lesson 5 Advanced Filter/Sort For even more complicated sorting, select Records, then Filters, and choose Advanced Filter/Sort from the submenu 14

Access Lesson 5 Advanced Filter/Sort If a filter is currently in use, it will be shown in the window Fields to be filtered are shown in columns Filter conditions can be entered below the field name >50 15

Access Lesson 5 Advanced Filter/Sort When the filter is applied, all condiments with more than 100 units in stock and all grains/cereals products with more than 50 units in stock are displayed 16

Access Lesson 5 What is a Query? A set of explicit specifications to tell Access exactly what information (and in what format) the user wishes to see The result of a query is a dynaset, or dynamic subset of the records Example uses: View information from multiple tables sorted in a specific order Perform many types of calculations on selected groups of records Find and display duplicate or unmatched records Update data, delete records, or append new records to a table Create a new table with records from one or more tables 17

Access Lesson 5 Kinds of Queries Select Queries Simple Select: Displays information from one or more tables sorted in a specific order Find Duplicate: Displays all records with duplicate values in one or more specified fields Find Unmatched: Displays records in one table that have no related records in another table 18

Access Lesson 5 Kinds of Queries Special Purpose Queries Parameter: Displays a dialog box to enter criteria for retrieving information AutoLookup: Automatically fills in values in a new record Crosstab: Calculates a sum or counts and groups its results in spreadsheet format to correlate the data with two types of information 19

Access Lesson 5 Kinds of Queries Action Queries Update: Makes global changes to a group of records in one or more tables Append: Adds a group of records from one or more tables to the end of one or more other tables Delete: Removes a group of records from one or more tables Make Table: Creates a new table from data from one or more tables 20

Access Lesson 5 Kinds of Queries SQL-Specific Queries Union: Combines fields from one or more tables into one field in the result Pass-Through: Sends commands to an ODBC server Data-Definition: Creates or changes database objects in Access, SQL-Server, or databases on other servers Subqueries: SQL SELECT or other server statements that form a SELECT query within another query 21

Access Lesson 5 Filters vs. Queries Use a filter when: Working within one table Working on a temporary subset of the table’s records Use a query when: Records will come from more than one table You will “ask the same question” again You don’t want to have to open a table or form You want an answer calculated from the data in the table(s) You want to create a new table from the result 22

Access Lesson 5 Creating Queries In the “Queries” tab, click “New” Queries Tab New 23

Access Lesson 5 Simple Query Wizard To create a select query, choose the Simple Query Wizard Click “OK” 24

Access Lesson 5 Simple Query Wizard Queries can include fields from more than one table Products Table ProductName UnitsInStock Fields Suppliers Table CompanyName Field 25

Access Lesson 5 Simple Query Wizard Select the detail view if all fields will be shown Summary is for fields with numbers that can be manipulated 26

Access Lesson 5 Simple Query Wizard Choose a name for the new query Click “Finish” Choose to open the query and view information 27

Access Lesson 5 Simple Query Wizard The completed query gathers the requested information from related tables and presents it in compact form 28

Access Lesson 5 Sorting Queries in Design View If the information isn’t sorted to the user’s liking, it can be resorted Click the Design View button to see the query’s design Set the correct sort in the sort row of the column that the query should be sorted by Sort: Ascending 29

Access Lesson 5 Sorting Queries in Design View The query is resorted by Product Name, ascending 30

Access Lesson 5 Query Design Toolbar Help Database Window Build Show Table Run Print Preview Save Copy Format Painter Top Values New Object Undo Print View Spell Check Cut Paste Query Type Properties Totals 31

Access Lesson 5 Setting Query Criteria Criteria may be built using the Expression Builder This tool holds all the Tables and Queries, standard Access functions and common expressions, as well as buttons to add operators and logical statements 32

Access Lesson 5 Setting Query Criteria Click an operator button to enter it in the expression window Click on field names or functions to put them in the window Type other needed information using the keyboard Like “B*” Like “B*” 33

Access Lesson 5 Setting Query Criteria The effect of restricting products to those beginning with the letter “B” 34

Access Lesson 5 Crosstab Query To begin creating a crosstab query, create a simple query that contains the fields you want to include Select the Simple Query Wizard and click “OK” 35

Access Lesson 5 Crosstab Query Move from table to table collecting the fields that will be included in the eventual crosstab query A crosstab query must have at least four fields to work with Products Table Order Details Table Order Table 36

Access Lesson 5 Crosstab Query Continue to move through the query wizard 37

Access Lesson 5 Crosstab Query Choose a name for the new query Click “Finish” Choose to open the query and view information 38

Access Lesson 5 Crosstab Query The completed select query 39

Access Lesson 5 Crosstab Query Begin a new query, and select Crosstab Query Wizard Click “OK” 40

Access Lesson 5 Crosstab Query In this dialog box, select “Queries” and choose the new select query Just-Created Select Query View Queries 41

Access Lesson 5 Crosstab Query Select “ProductName” and CustomerID as Row Headings Row headings provide the row data and the sort order ProductName CustomerID Row Headings 42

Access Lesson 5 Crosstab Query Use OrderDate as the Column Heading The columns contain the time location of the data that will be tabulated OrderDate Column Headings 43

Access Lesson 5 Crosstab Query Choose to view the results by quarter Note that the column heading changes to quarters The quarter data is obtained automatically from the OrderDate field Quarter Column Headings 44

Access Lesson 5 Crosstab Query For the calculated part, choose “Sum” This will sum up the orders by Product by Customer by Quarter Sum Sum(Quantity) 45

Access Lesson 5 Crosstab Query Choose a name for the new crosstab query Click “Finish” Choose to open the query and view information 46

Access Lesson 5 Crosstab Query The completed crosstab query shows each product and the quantity that each customer purchased, both in total and by quarter 47

Access Lesson 5 Find Duplicates Query Begin a new query, and select Find Duplicates Query Wizard Click “OK” 48

Access Lesson 5 Find Duplicates Query Pick the fields likely to have duplicate entries City 49

Access Lesson 5 Find Duplicates Query Choose a name for the new query Click “Finish” Choose to open the query and view information 50

Access Lesson 5 Find Duplicates Query The completed query shows how many times each city appears in the customers table 51

Access Lesson 5 Unmatched Query Begin a new query, and select Find Unmatched Query Wizard Click “OK” 52

Access Lesson 5 Unmatched Query Select two related tables where there might be unmatched records 53

Access Lesson 5 Unmatched Query Select two related tables where there might be unmatched records 54

Access Lesson 5 Unmatched Query Indicate which field links the two tables Access attempts to do this automatically 55

Access Lesson 5 Unmatched Query Select all fields to be in the results 56

Access Lesson 5 Unmatched Query Choose a name for the new query Click “Finish” Choose to open the query and view information 57

Access Lesson 5 Unmatched Query In this instance, no unmatched data is found Referential integrity prevents unmatched data! 58

Access Lesson 5 Parameter Query Begin a new query, and select Design View Click “OK” 59

Access Lesson 5 Parameter Query Choose the table which will be searched 60

Access Lesson 5 Parameter Query Insert the fields that will be shown in the query In the “Criteria” line, enter the prompt in square brackets [ ] Click the “Run” button [Enter Contact Name] Type the value to be searched for 61

Access Lesson 5 Parameter Query The completed query finds the contact name and its related information 62

Access Lesson 5 Union Query A union query merges similar data into one field Union Queries are created by writing SQL statements Click the view button and choose SQL view SQL View 63

Access Lesson 5 Union Query The SQL view shows the statements that comprise the query All queries are really SQL statements; Access hides the details to make it easier for the user Space can be saved in the database by writing SQL rather than saving queries 64

Access Lesson 5 Review Filter by Form Using “And” and “Or” to Filter Advanced Filter/Sort Queries Select Queries Query Criteria Crosstab Queries Find Duplicates Queries Find Unmatched Queries Parameter Queries Union Queries 65