Chapter 2 Querying a Database MICROSOFT ACCESS 2010.

Slides:



Advertisements
Similar presentations
Chapter 1 Databases and Database Objects: An Introduction
Advertisements

Microsoft Access 2010 Chapter 2 Querying a Database.
Microsoft Office 2007 Access Chapter 3 Maintaining a Database.
Excel Understanding Excel Fundamentals Microsoft Office 2010 Fundamentals 1.
Chapter 5 Multitable Forms
Microsoft Office 2010 Access Chapter 1 Creating and Using a Database.
Chapter 5 Creating, Sorting, and Querying a Table
Microsoft Office 2007 Access Chapter 4 Creating Reports and Forms.
Microsoft Excel 2010 Chapter 7
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.
Staff Development Daze June 27 & 28 Tony Gauvin. Schedule  Monday June 27  Monday June 27  9:00 – 12:00 Basic Excel  12:00 – 1:00 Lunch for all workshop.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 1 Creating and Using a Database.
Chapter 2 Querying a Database
Microsoft Excel 2010 Chapter 8
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.
Microsoft Access 2010 Chapter 7 Using SQL.
Access Tutorial 8 Sharing, Integrating, and Analyzing Data
Multi-Table Forms Access – Lesson 5.
Access Tutorial 10 Automating Tasks with Macros
Chapter 9 Macros, Navigation Forms, PivotTables, and PivotCharts
Chapter 2 Querying a Database
Chapter 3 Maintaining a Database
Developing Effective Reports
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 1 1. Chapter 2: Relational Databases and Multi-Table Queries Exploring Microsoft Office.
Chapter 1 Databases and Database Objects: An Introduction
Using Form Tools and Creating Custom Forms Microsoft Access 2010.
Chapter 6 Advanced Report Techniques
® Microsoft Office 2013 Access Building a Database and Defining Table Relationships.
Chapter 6 Generating Form Letters, Mailing Labels, and a Directory
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 5 Enhancing Forms with OLE Fields, Hyperlinks, and Subforms.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 4 BACKNEXTEND 4-1 LINKS TO OBJECTIVES Query Design Query Criteria Modify a Query Using OR.
Lesson 2.  To help ensure accurate data, rules that check entries against specified values can be applied to a field. A validation rule is applied to.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 6 Switchboards, PivotTables, and PivotCharts.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 5 Enhancing Forms with OLE Fields, Hyperlinks, and Subforms.
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.
® Microsoft Office 2010 Access Tutorial 3 Maintaining and Querying a Database.
Chapter 17 Creating a Database.
® Microsoft Office 2010 Building a Database and Defining Table Relationships.
Microsoft Publisher 2010 Chapter 7 Advanced Formatting and Merging Publications with Data.
Microsoft Access 2010 Chapter 10 Administering a Database System.
Microsoft Access 2010 Chapter 8 Advanced Form Techniques.
MS-ACCESS BY SANGEETHA PARTHASARATHY Topics Covered Understanding different types of Queries Creating a Query Creating a Query using a Wizard Changing.
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.
1 After completing this lesson, you will be able to: Create and run a query. Specify criteria in a query. Create a calculated field. Create a multiple-table.
© Paradigm Publishing Inc. ACCESS CREATING QUERIES, FORMS, AND REPORTS Section 3.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 1 Creating and Using a Database.
Microsoft Access 2010 Chapter 4 Creating Reports and Forms.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 8 – Integrating a Database with a FrontPage.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 6 BACKNEXTEND 6-1 LINKS TO OBJECTIVES Using the Report Button Using the Report Button Print.
Modify Tables and FieldsModify Tables and Fields Lesson 4 © 2014, John Wiley & Sons, Inc.Microsoft Official Academic Course, Microsoft Word Microsoft.
MSOffice Access Microsoft® Office 2010: Illustrated Introductory 1 Part 1 ® Database & Table.
Microsoft Office 2013 Try It! Chapter 4 Storing Data in Access.
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.
MSOffice Access Microsoft® Office 2010: Illustrated Introductory 1 Part 2 ® Building Queries.
Chapter 7 Creating Templates, Importing Data, and Working with SmartArt, Images, and Screen Shots Microsoft Excel 2013.
Chapter 8 Working with Trendlines, PivotTable Reports, PivotChart Reports, and Slicers Microsoft Excel 2013.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 1 Creating and Using a Database.
Using Macros, Switchboards, PivotTables, and PivotCharts
Access Chapter 2 Querying a Database.
Objectives Create an action query to create a table
Querying a Database Using the Select Query Window
Creating and Using a Database
Chapter 4 Creating Reports and Forms
Chapter 1 Databases and Database Objects: An Introduction
Shelly Cashman: Microsoft Access 2016
Presentation transcript:

Chapter 2 Querying a Database MICROSOFT ACCESS 2010

 Create queries using Design view  Include fields in the design grid  Use text and numeric data in criteria  Save a query and use the saved query  Create and use parameter queries  Use compound criteria in queries  Sort data in queries  Join tables in queries  Create a report and a form from a query  Export data from a query to another application  Perform calculations in queries  Create crosstab queries  Customize the Navigation Pane 2 OBJECTIVES

3 PROJECT – QUERYING A DATABASE

4 GENERAL PROJECT GUIDELINES  Identify the fields  Identify restrictions  Determine whether special order is required  Determine whether more than one table is required  Determine whether calculations are required  If data is to be summarized, determine whether a crosstab query would be appropriate

5 CREATING A QUERY IN DESIGN VIEW  Click Create on the Ribbon  Click the Query Design button (Create tab | Queries group) to create a new query  Click the table to add to the query  Click the Add button to add the selected table to the query  Click the Close button to remove the dialog box from the screen  Drag the lower edge of the field list down far enough so all fields in the table appear

6 CREATING A QUERY IN DESIGN VIEW

7 ADDING FIELDS TO THE DESIGN GRID  Double-click each field to add to the query

 Click the Criteria row for the field to produce an insertion point  Type the criterion  Click the View button (Query Tools Design tab | Results group) to display the query results 8 USING TEXT DATA IN CRITERION

9  Click the Save button on the Quick Access Toolbar  Type the name of the query  Click the OK button to save the query

 Click the Criteria row below the desired field to produce an insertion point  If necessary, delete the current entry  Type the criterion containing the wildcard character (*) 10 USING A WILDCARD

11 USING CRITERIA FOR A FIELD NOT INCLUDED IN THE RESULTS  With the desired query open, click the Show check box to remove the check mark for a field containing criteria

12 CREATING AND VIEWING A PARAMETER QUERY  In a Design view, type the criterion for a parameter query ([Enter City], for example)  Run the query

13 CREATING AND VIEWING A PARAMETER QUERY

 Click the Query Design button (Create tab | Queries group) to create a new query  Click the table you wish to add to the query  Click the Add button to add the selected table to the query  Click the Close button to remove the dialog box from the screen  Add the desired fields to the query  Add a numeric criterion for a numeric field 14 USING A NUMBER IN A CRITERION

15 USING A NUMBER IN A CRITERION

16 USING A COMPARISON OPERATOR IN A CRITERION  Open the query in Design view  Enter the criterion with a comparison operator

17 USING A COMPOUND CRITERION INVOLVING AND  Open the query in Design view  Add the criteria for two fields in the Criteria row

18 USING A COMPOUND CRITERION INVOLVING OR  Open the query in Design view  Add criterion for one field to the Criteria row  Add criterion for another field in the or row (the row below the Criteria row)

19 CLEARING THE DESIGN GRID  Open the query in Design view  Click just above the column heading in the first column in the grid to select the column  Hold the SHIFT key down and click just above the last column heading to select all the columns  Press the DELETE key to clear the design grid

20 CLEARING THE DESIGN GRID

 Open the query in Design view  Click the Sort row below the field you wish to sort, and then click the Sort row arrow to display a menu of possible sort orders  Click the desired sort order 21 SORTING DATA IN A QUERY

22 OMITTING DUPLICATES  Open the query in Design view  Click an empty field in the design grid  Click the Property Sheet button (Query Tools Design tab | Show/Hide group)  Click the Unique Values property box, and then click the arrow that appears to produce a list of available choices  Click Yes and then close the Query Properties property sheet by clicking the Property Sheet button a second time

23 OMITTING DUPLICATES

24 SORTING ON MULTIPLE KEYS  Open the query in Design view  Select a sort order in the Sort column for multiple fields

25 CREATING A TOP-VALUES QUERY  Open the query in Design view  Click the Return box arrow (Query Tools Design tab | Query Setup group) to display the Return box menu  Click an option corresponding to the values you wish to return

26 JOINING TABLES

 Click the Query Design button (Create tab | Queries group) to create a new query  Add two related tables to the new query  Add the desired fields from each table to the query 27 JOINING TABLES

28 JOINING TABLES

 Open the query in Design view  Right-click the join line to produce a shortcut menu  Click Join Properties on the shortcut menu to display the Join Properties dialog box 29 CHANGING JOIN PROPERTIES

30 CREATING A REPORT INVOLVING A JOIN  Open the Navigation Pane, and then select the desired query containing a join in the Navigation Pane  Click the Report Wizard button (Create tab | Reports group)  Add the desired fields to the query  Click the Next button to display the next Report Wizard screen  Follow the remaining steps in the wizard to specify a grouping, sort order, layout and orientation, and title  Click the Finish button to produce the report

 Select the query in the Navigation Pane  Click the Form button (Create tab | Forms group) to create a simple form 31 CREATING A FORM FOR A QUERY

32 EXPORTING DATA TO EXCEL  Click the desired query in the Navigation pane  Click the Excel button (External Data tab | Export group)  Click the Browse button  Navigate to the location to save the exported file  Click the OK button to export the data  Click the ‘Save export steps’ check box to display the Save export steps options  Type the desired name for the steps in the Save as text box  Click the Save Export button to save the export steps

33 EXPORTING DATA TO EXCEL

34 RESTRICTING THE RECORDS IN A JOIN  Open the query containing a join  Type the criterion for the desired field

35 USING A CALCULATED FIELD IN A QUERY  Open the query in Design view containing a field that can be calculated  Right-click the Field row in the first open column in the design grid to display a shortcut menu  Click Zoom on the shortcut menu to display the Zoom dialog box  Type the calculation in the Zoom dialog box  Click the OK button (Zoom dialog box) to enter the expression

36 USING A CALCULATED FIELD IN A QUERY

37 CHANGING A CAPTION  Open the query in Design view  Click the field in the design grid to which you wish to add the caption, and then click the Property Sheet button (Query Tools Design tab | Show/Hide group)  Click the Caption box, and then type the desired caption  Close the property sheet by clicking the property Sheet button a second time

38 CHANGING A CAPTION

39 CALCULATING STATISTICS  Create a new query for a table containing fields for which you can calculate statistics  Click the Totals button (Query Tools Design tab | Show/Hide group) to include the Total row in the design grid  Add the field for which you wish to total  Click the Total row for the added field  Click the Total box arrow to display the Total list  Select the desired calculation for Access to perform

40 CALCULATING STATISTICS

 Add a field to the query containing statistics for which you wish to add criteria  Click the Total box arrow for the added field  Click Where  Type the criterion in the Criteria row 41 USING CRITERIA IN CALCULATING STATISTICS

42 USING GROUPING

43 CROSSTAB QUERIES

44 CREATING A CROSSTAB QUERY  Click the Query Wizard button (Create tab | Queries group)  Click Crosstab Query Wizard (New Query dialog box)  Click the OK button to display the Crosstab Query Wizard dialog box  Follow the instructions in the wizard to select the row and column headings for the query, and then name the query

45 CREATING A CROSSTAB QUERY

46 CUSTOMIZING THE NAVIGATION PANE  If necessary, click the Shutter Bar Open/Close Button to open the Navigation Pane  Click the Navigation Pane arrow to produce the Navigation Pane menu  Click the desired option to organize the Navigation Pane

47 CUSTOMIZING THE NAVIGATION PANE