© Paradigm Publishing, Inc. 1. 2 Access 2010 Level 2 Unit 1Advanced Tables, Relationships, Queries, and Forms Chapter 3Advanced Query Techniques.

Slides:



Advertisements
Similar presentations
Objectives Create an action query to create a table
Advertisements

© Paradigm Publishing, Inc Access 2010 Level 1 Unit 1Creating Tables and Queries Chapter 2Creating Relationships between Tables.
Benchmark Series Microsoft Excel 2013 Level 2
Benchmark Series Microsoft Access 2010 Level 1
© 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 10 – Designing.
Chapter 5 Creating, Sorting, and Querying a Table
Access Lesson 2 Creating a Database
Microsoft Office 2007 Access Chapter 2 Querying a Database.
Chapter 1 Databases and Database Objects: An Introduction
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 2 Querying a Database Using the Select Query Window.
Access Tutorial 3 Maintaining and Querying a Database
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 3 1 Microsoft Office Access 2003 Tutorial 3 – 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 Microsoft Office Access 2003.
Microsoft Access 2010 Chapter 7 Using SQL.
Access Tutorial 3 Maintaining and Querying a Database
Chapter 9 Macros, Navigation Forms, PivotTables, and PivotCharts
Chapter 2 Querying a Database
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory Pasewark & Pasewark.
Chapter 3 Maintaining a Database
Maintaining and Querying a Database Microsoft Access 2010.
Copyright 2007, Paradigm Publishing Inc. BACKNEXTEND 3-1 LINKS TO OBJECTIVES Save a Filter as a Query Save a Filter as a Query Parameter Query Inner, Left,
Chapter 2 Querying a Database MICROSOFT ACCESS 2010.
© Paradigm Publishing, Inc Access 2010 Level 2 Unit 2Advanced Reports, Access Tools, and Customizing Access Chapter 7Automating, Customizing, and.
Chapter 1 Databases and Database Objects: An Introduction
© Paradigm Publishing, Inc Access 2010 Level 2 Unit 1Advanced Tables, Relationships, Queries, and Forms Chapter 4Creating and Using Custom Forms.
Chapter 6 Advanced Report Techniques
© Paradigm Publishing, Inc Access 2010 Level 2 Unit 2Advanced Reports, Access Tools, and Customizing Access Chapter 5Creating and Using Custom Reports.
Chapter 6 Generating Form Letters, Mailing Labels, and a Directory
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 4 BACKNEXTEND 4-1 LINKS TO OBJECTIVES Query Design Query Criteria Modify a Query Using OR.
Analyzing Data For Effective Decision Making Chapter 3.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 9 1 Microsoft Office Access 2003 Tutorial 9 – Using Action Queries, and Defining Table Relationships.
Microsoft Office 2007 Access Chapter 2 Querying a Database.
Microsoft Office 2007 Access Chapter 6 Using Macros, Switchboards, PivotTables, and PivotCharts.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 7 BACKNEXTEND 7-1 LINKS TO OBJECTIVES Filtering Data Removing a Filter Filter by Selection.
MS-ACCESS BY SANGEETHA PARTHASARATHY Topics to be covered §Comparing Values in Selection Criteria §Calculating Values in a Query §Changing the appearance.
© Paradigm Publishing, Inc Access 2010 Level 1 Unit 2Creating Forms and Reports Chapter 5Creating Forms.
® Microsoft Office 2010 Access Tutorial 3 Maintaining and Querying a Database.
© Paradigm Publishing, Inc Access 2010 Level 2 Unit 2Advanced Reports, Access Tools, and Customizing Access Chapter 6Using Access Tools and Managing.
Microsoft Office 2007 Access Chapter 3 Maintaining a Database.
® Microsoft Access 2010 Tutorial 9 Using Action Queries and Advanced Table Relationships.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Access Project 7 Advanced Report and Form Techniques.
Microsoft Outlook 2010 Chapter 3 Managing Contacts and Personal Contact Information with Outlook.
Filtering Data A filter is a set of restrictions you place on the records of an open datasheet or form to temporarily isolate a subset of the records.
Microsoft Access 2010 Chapter 10 Administering a Database System.
® Microsoft Office 2013 Access Creating a Database.
Tutorial 9 Using Action Queries and Advanced Table Relationships.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-1 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining.
Microsoft Access 2010 Chapter 8 Advanced Form Techniques.
® 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.
COMPREHENSIVE Access Tutorial 3 Maintaining and Querying a Database.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 3 BACKNEXTEND 3-1 LINKS TO OBJECTIVES Modify a Table – Add, Delete, Move Fields Modify a Table.
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.
Actions Queries. Understanding Action Queries  Action queries are a way to make corrections to database. They can make an enormous mess of database if.
ACCESS Part 2. OBJECTIVE  Use the Query Wizard.  Work with data in a query.  Use Query Design View.  Sort and find data.  Filter data Apply AND criteria.
MODULE 7 Microsoft Access 2010 Chapter 1: Working with Databases Chapter 2: Using Forms and Tables Chapter 3: Working with Queries and Reports 1© Paradigm.
© Paradigm Publishing, Inc Access 2010 Level 1 Unit 1Creating Tables and Queries Chapter 3Performing Queries.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 8 – Integrating a Database with a FrontPage.
XP New Perspectives on Microsoft Access 2002 Tutorial 31 Microsoft Access 2002 Tutorial 3 – Querying a Database.
Microsoft Access 2000 Modifying Tables, Creating Forms and Viewing Data.
MSOffice Access Microsoft® Office 2010: Illustrated Introductory 1 Part 1 ® Database & Table.
MSOffice Access Microsoft® Office 2010: Illustrated Introductory 1 Part 2 ® Building Queries.
® Microsoft Access 2010 Tutorial 9 Using Action Queries and Advanced Table Relationships.
® Microsoft Access 2010 Tutorial 9 Using Action Queries and Advanced Table Relationships.
Objectives Create an action query to create a table
MODULE 7 Microsoft Access 2010
Chapter 1 Databases and Database Objects: An Introduction
Tutorial 9 Using Action Queries and Advanced Table Relationships
Presentation transcript:

© Paradigm Publishing, Inc. 1

2 Access 2010 Level 2 Unit 1Advanced Tables, Relationships, Queries, and Forms Chapter 3Advanced Query Techniques

© Paradigm Publishing, Inc. 3 Advanced Query Techniques  Extract Records Using Select Queries Extract Records Using Select Queries  Modify Join Properties in a Query Modify Join Properties in a Query  CHECKPOINT 1 CHECKPOINT 1  Create and Use Subqueries Create and Use Subqueries  Select Records Using a Multiple-Value Field Select Records Using a Multiple-Value Field  Perform Operations Using Action Queries Perform Operations Using Action Queries  CHECKPOINT 2 CHECKPOINT 2 Quick Links to Presentation Contents

© Paradigm Publishing, Inc. 4 Extract Records Using Select Queries  A select query is the type of query most often used in Access.  Select queries extract records from a single table or from multiple tables according to criteria that you specify.

© Paradigm Publishing, Inc. 5 Extract Records Using Select Queries…continued  A filter is used in a datasheet or form to temporarily hide records that do not meet specified criteria. The subset of records can be edited, viewed, or printed.  A filter is active until it is removed or until the datasheet or form is closed.

© Paradigm Publishing, Inc. 6 Extract Records Using Select Queries…continued To save a filter as a query: 1.Open the table. 2.Filter the table as desired. 3.Click the Advanced Filter Options button in the Sort & Filter group in the Home tab. 4.Click the Filter By Form option at the drop-down list. continues on next slide… Filter By Form option

© Paradigm Publishing, Inc. 7 Extract Records Using Select Queries…continued 5.Click the Advanced Filter Options button in the Sort & Filter group in the Home tab. 6.Click the Save As Query option in the drop-down list. continues on next slide… Save As Query option

© Paradigm Publishing, Inc. 8 Extract Records Using Select Queries…continued 7.At the Save As Query dialog box, type the desired query name. 8.Click OK. 9.Close the Filter By Form datasheet. 10.Close the table. Save As Query dialog box

© Paradigm Publishing, Inc. 9 Extract Records Using Select Queries…continued  In a parameter query, specific criteria for a field are not stored with the query design. Instead, the field(s) used to select records have a prompt message that displays when the query is run. Enter Parameter Value dialog box

© Paradigm Publishing, Inc. 10 Extract Records Using Select Queries…continued  The message in the dialog box is created in the field to which the criterion will be applied.  When the query is run, the user types the criterion at the Enter Parameter Value dialog box. Access then selects the records based on that criterion.  If more than one field contains a parameter, Access prompts the user one field at a time.

© Paradigm Publishing, Inc. 11 Extract Records Using Select Queries…continued To create a parameter query: 1.Start a new query in Design view. 2.Add the desired table(s). 3.Close the Show Table dialog box. 4.Add the desired fields to the query design grid. 5.Click in the Criteria row of the field to be prompted. 6.Type the message text, encased in square brackets. 7.Repeat Steps 5-6 for each additional criteria field. 8.Save the query. 9.Close the query. Criteria row

© Paradigm Publishing, Inc. 12 Modify Join Properties in a Query  The term join properties refers to the way in which Access matches the values in the common fields between two tables in a relationship.  Access provides for three join types in a relationship: an inner join, a left outer join, and a right outer join.

© Paradigm Publishing, Inc. 13 Modify Join Properties in a Query…continued To create a query with an inner join: 1.Create a new query in Design view. 2.Add the tables to the query window. 3.Double-click the join line between the tables. 4.At the Join Properties dialog box, click OK. 5.Add the desired fields to the query design grid. 6.Save and run the query. Join Properties dialog box

© Paradigm Publishing, Inc. 14 Modify Join Properties in a Query…continued To create a query with a left outer join: 1.Create a new query in Design view. 2.Add the tables to the query window. 3.Double-click the join line between the tables. 4.At the Join Properties dialog box, click option 2. 5.Click OK. 6.Add the desired fields to the query design grid. 7.Save and run the query. option 2

© Paradigm Publishing, Inc. 15 Modify Join Properties in a Query…continued To create a right outer join: 1.Create a new query in Design view. 2.Add the tables to the query window. 3.Double-click the join line between the tables. 4.At the Join Properties dialog box, click option 3. 5.Click OK. 6.Add the desired fields to the query design grid. 7.Save and run the query. option 3

© Paradigm Publishing, Inc. 16 Modify Join Properties in a Query…continued To remove a table from a query: 1.Open the query in Design view. 2.Right-click the table. 3.Click the Remove Table option at the shortcut menu. Remove Table option

© Paradigm Publishing, Inc. 17 Modify Join Properties in a Query…continued To create a self-join query: 1.Create a new query in Design view. 2.Add two copies of the same table to the query. 3.Right-click the second table name. 4.Click the Properties option. continues on next slide… Properties option

© Paradigm Publishing, Inc. 18 Modify Join Properties in a Query…continued 5.Click in the Alias property box and delete the existing table name. 6.Type the alias table name. 7.Close the Property Sheet. continues on next slide… Alias property box

© Paradigm Publishing, Inc. 19 Modify Join Properties in a Query…continued 8.Drag the field name from the left table to the field name in the right table that contains the matching values. 9.Add fields to the query design grid as required. 10.Run the query. 11.Save the query. field name

© Paradigm Publishing, Inc. 20 Modify Join Properties in a Query…continued  If a query is created from two tables for which no join is established, Access will not know how to relate the records in each table.  In the absence of a relationship, Access produces a datasheet representing every combination of records between the two tables. This type of query is called a cross product or Cartesian product query.  If you add two tables to a query and no join line appears, create a join by dragging a field from one table to a compatible field in the other table.

© Paradigm Publishing, Inc. 21 1)This is the type of query most often used in Access. a.append b.select c.update d.make-table 1)This is the type of query most often used in Access. a.append b.select c.update d.make-table 3)The Advanced Filter Options button is located in this tab. a.Home b.Create c.External Data d.Database Tools 3)The Advanced Filter Options button is located in this tab. a.Home b.Create c.External Data d.Database Tools 2)This is used to temporarily hide records that do not meet specified criteria. a.screen b.section c.filter d.sort 2)This is used to temporarily hide records that do not meet specified criteria. a.screen b.section c.filter d.sort 4)By default, Access uses this type of join between tables. a.inner b.outer c.left d.right 4)By default, Access uses this type of join between tables. a.inner b.outer c.left d.right Next Question Next Slide Answer

© Paradigm Publishing, Inc. 22 Create and Use Subqueries  When performing multiple calculations based on numeric fields, you may decide to create a separate query for each individual calculation and then use subqueries to generate the final total.  A subquery is a query nested inside another query.  Using subqueries to break the calculations into individual objects allows you to reuse a calculated field in multiple queries.

© Paradigm Publishing, Inc. 23 Create and Use Subqueries…continued To nest a query within a query: 1.Start a new query in Design view. 2.At the Show Table dialog box, click the Queries tab. 3.Double-click the query to be used as a subquery. 4.Add other queries or tables as required. 5.Close the Show Table dialog box. 6.Add fields as required. 7.Save and run the query. Queries tab

© Paradigm Publishing, Inc. 24 Select Records Using a Multiple-Value Field To show a multiple-value field in separate rows in a query: 1.Open the query in Design view. 2.Click in the Field list box of the multiple-value field in the design grid. 3.Move the insertion point to the end of the field name. 4.Type a period. 5.Press Enter to accept the.Value property. 6.Save the query. Field list box

© Paradigm Publishing, Inc. 25 Perform Operations Using Action Queries

© Paradigm Publishing, Inc. 26 Perform Operations Using Action Queries…continued To create a make-table query: 1.Create the query in Design view. 2.Add the desired table to the query. 3.Add the desired fields to the query design grid. 4.Enter the criteria to select records. 5.Run the query. 6.Switch to Design view. 7.Click the Make Table button in the Query Type group in the Query Tools Design tab. continues on next slide… Make Table button

© Paradigm Publishing, Inc. 27 Perform Operations Using Action Queries…continued 8.Type a table name. 9.At the Make Table dialog box, select the destination database. 10.Click OK. 11.Run the query. 12.Click Yes. 13.Save the query. Make Table dialog box

© Paradigm Publishing, Inc. 28 Perform Operations Using Action Queries…continued  A delete query is used to delete, in one step, a group of records that meet specific criteria.  You can use this action query in any instance in which the records you want to delete can be selected using a criteria statement.

© Paradigm Publishing, Inc. 29 Perform Operations Using Action Queries…continued To delete records using a query: 1.Right-click the make-table query. 2.Click the Design View option at the shortcut menu. 3.Click the Delete button in the Query Type group in the Query Tools Design tab. 4.Click the File tab. 5.Click Save Object As. 6.Type the name and click OK. 7.Run the query. 8.A the Microsoft Access message, click Yes. Microsoft Access message

© Paradigm Publishing, Inc. 30 Perform Operations Using Action Queries…continued To add records to a table using a query: 1.Open the make-table query in Design view. 2.Click the Append button in the Query Type group in the Query Tools Design tab. 3.At the Append dialog box, click OK. 4.Click the File tab. 5.Click Save Object As. 6.Type the name and click OK. 7.Run the query. 8.A the Microsoft Access message, click Yes. Append dialog box

© Paradigm Publishing, Inc. 31 Perform Operations Using Action Queries…continued To create an update query: 1.Create the query in Design view. 2.Add the desired table to the query. 3.Add the desired fields to the query design grid. 4.Enter the criteria to select records. 5.Run the query. 6.Switch to Design view. 7.Click the Update button in the Query Type group in the Query Tools Design tab. 8.Click in the Update To box in the field to be changed. 9.Type the update expression. 10.Run the query. 11.Click Yes. 12.Save the query. Update To box

© Paradigm Publishing, Inc. 32 1)This is a query nested inside another query. a.make-table query b.update query c.append query d.subquery 1)This is a query nested inside another query. a.make-table query b.update query c.append query d.subquery 3)This type of query is used to delete, in one step, a group of records that meet specific criteria. a.update b.delete c.append d.select 3)This type of query is used to delete, in one step, a group of records that meet specific criteria. a.update b.delete c.append d.select 2)With this type of query, selected records are added to the end of an existing table. a.update b.delete c.append d.select 2)With this type of query, selected records are added to the end of an existing table. a.update b.delete c.append d.select 4)With this type of query, a global change is made to a selected group of records based on an expression. a.update b.delete c.append d.select 4)With this type of query, a global change is made to a selected group of records based on an expression. a.update b.delete c.append d.select Next Question Next Slide Answer

© Paradigm Publishing, Inc. 33 Advanced Query Techniques Save a filter as a query Create and run a parameter query to prompt for criteria Add tables to and remove tables from a query Create an inner join, left join, and right join to modify query results Create a self-join to match two fields in the same table Create a query that includes a subquery Assign an alias to a table and a field name Select records using a multiple-value field in a query Create a new table using a make-table query Remove records from a table using a delete query Add records to the end of an existing table using an append query Modify records using an update query Summary of Presentation Concepts