SlideShare a Scribd company logo
1 of 58
Microsoft
Access 2013
Chapter 2
Querying a Database
• 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
Objectives
Querying a Database 2
• Join tables in queries
• Create a report and a form from a query
• Export data from a query to another application
• Perform calculations and calculate statistics in
queries
• Create crosstab queries
• Customize the Navigation Pane
Querying a Database 3
Objectives
Querying a Database 4
Project – Querying a Database
• Create queries in Design view
• Use criteria in queries
• Sort data in queries
• Join tables in queries
• Export query results
• Perform calculations in queries
• Create a crosstab query
• Customize the Navigation Pane
Querying a Database 5
Roadmap
• Tap or click the ‘Shutter Bar Open/Close Button’ to close
the Navigation Pane
• Tap or click CREATE on the ribbon to display the CREATE tab
• Tap or click the Query Design button (CREATE tab | Queries
group) to create a new query
• Tap or click the table to add to the query
• Tap or click the Add button to add the selected table to the
query
• Tap or 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
Querying a Database 6
Creating a Query in Design View
Querying a Database 7
Creating a Query in Design View
• Double-tap or double-click each field to add to
the query
Querying a Database 8
Adding Fields to the Design Grid
Using Text Data in Criterion
• Tap or click the Criteria
row for the field to
produce an insertion point
• Type the criterion
• Tap or click the Run button
(QUERY TOOLS DESIGN tab
| Results group) to run the
query
9Querying a Database
• Tap or click the Save button on the Quick Access
Toolbar to display the Save As dialog box
• Type the name of the query
• Tap or click the OK button (Save As dialog box) to
save the query
Querying a Database 10
Using Text Data in Criterion
• If necessary, tap or 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 (*)
Querying a Database 11
Using a Wildcard
Querying a Database 12
Using a Wildcard
• With the desired query open, tap or click the
Show check box to remove the check mark for a
field containing criteria
Querying a Database 13
Using Criteria for a Field Not Included
in the Results
Querying a Database 14
Using Criteria for a Field Not Included
in the Results
• If necessary, return to Design view and type the
criterion for a parameter query ([Enter City], for
example)
• Run the query
Querying a Database 15
Creating and Viewing a Parameter Query
Querying a Database 16
Creating and Viewing a Parameter Query
• Tap or click the Query Design button (CREATE tab
| Queries group) to create a new query
• Tap or click the table you wish to add to the query
• Tap or click the Add button to add the selected
table to the query
• Tap or 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
Querying a Database 17
Using a Number in a Criterion
Querying a Database 18
Using a Number in a Criterion
• Open the query in Design view
• Enter the criterion with a comparison operator
Querying a Database 19
Using a Comparison Operator
in a Criterion
• Open the query in Design view
• Add the criteria for two fields in the Criteria row
Querying a Database 20
Using a Compound Criterion
Involving AND
• 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)
Querying a Database 21
Using a Compound Criterion
Involving OR
• Open the query in Design view
• Tap or click just above the column heading in the
first column in the grid to select the column
• Hold the SHIFT key down and tap or click just
above the last column heading to select all the
columns
• Press the DELETE key to clear the design grid
Querying a Database 22
Clearing the Design Grid
Querying a Database 23
Clearing the Design Grid
• Open the query in Design view
• Tap or 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
Querying a Database 24
Sorting Data in a Query
• Open the query in Design view
• Tap or click an empty field in the design grid
• Tap or click the Property Sheet button (QUERY TOOLS
DESIGN tab | Show/Hide group) to display the
property sheet
• Tap or click the Unique Values property box, and then
tap or click the arrow that appears to produce a list of
available choices
• Tap or click Yes and then close the Query Properties
property sheet by tapping or clicking the Property
Sheet button (QUERY TOOLS DESIGN tab | Show /
Hide group) a second time
Querying a Database 25
Omitting Duplicates
Querying a Database 26
Omitting Duplicates
• Open the query in Design view
• Select a sort order in the Sort column for multiple
fields
Querying a Database 27
Sorting on Multiple Keys
• Open the query in Design view
• Click the Return arrow (QUERY TOOLS DESIGN tab
| Query Setup group) to display the Return menu
• Tap or click an option corresponding to the values
you wish to return
Querying a Database 28
Creating a Top-Values Query
Querying a Database 29
Joining Tables
• Tap or 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
Querying a Database 30
Joining Tables
Querying a Database 31
Joining Tables
Querying a Database 32
Joining Tables
• Open the query in Design view
• Press and hold or right-click the join line to
produce a shortcut menu
• Tap or click Join Properties on the shortcut menu
to display the Join Properties dialog box
Querying a Database 33
Changing Join Properties
Querying a Database 34
Changing Join Properties
• Open the Navigation Pane, and then select the
desired query in the Navigation Pane
• Tap or click the Report Wizard button (CREATE tab |
Reports group) to display the Report Wizard dialog
box
• Add the desired fields to the query
• Follow the remaining steps in the wizard to specify a
grouping, sort order, layout and orientation, and title
• Tap or click the Finish button to produce the report
Querying a Database 35
Creating a Report from a Query
Querying a Database 36
Creating a Report from a Query
• Select the query in the Navigation Pane
• Tap or click the Form button (CREATE tab | Forms
group) to create a simple form
Querying a Database 37
Creating a Form for a Query
• Tap or click the desired query in the Navigation Pane
to select it
• Tap or click the Excel button (EXTERNAL DATA tab |
Export group) to display the Export - Excel
Spreadsheet dialog box
• Tap or click the Browse button (Export - Excel
Spreadsheet dialog box) to display the File Save
dialog box
• Navigate to the location to save the exported file
• Tap or click the OK button (Export - Excel Spreadsheet
dialog box) to export the data
Querying a Database 38
Exporting Data to Excel
• Tap or click the ‘Save export steps’ check box
(Export - Excel Spreadsheet dialog box) to display
the Save Export Steps options
• Type the desired name for the steps in the Save as
text box
• If necessary, type a description for the export
steps
• Tap or click the Save Export button (Export - Excel
Spreadsheet dialog box) to save the export steps
Querying a Database 39
Exporting Data to Excel
Querying a Database 40
Exporting Data to Excel
• Open the query containing a join
• Type the criterion for the desired field
Querying a Database 41
Restricting the Records in a Join
• Open the query in Design view containing a field that
can be calculated
• Press and hold or right-click the Field row in the first
open column in the design grid to display a shortcut
menu
• Tap or click Zoom on the shortcut menu to display the
Zoom dialog box
• Type the calculation in the Zoom dialog box
• Tap or click the OK button (Zoom dialog box) to enter
the expression
Querying a Database 42
Using a Calculated Field in a Query
Querying a Database 43
Using a Calculated Field in a Query
• Open the query in Design view
• Tap or click the field in the design grid to which
you wish to add the caption, and then tap or click
the Property Sheet button (QUERY TOOLS DESIGN
tab | Show/Hide group) to display the properties
for the field
• Tap or click the Caption box, and then type the
desired caption
• Close the property sheet by tapping or clicking the
property Sheet button a second time
Querying a Database 44
Changing a Caption
Querying a Database 45
Changing a Caption
• Create a new query for a table containing fields for
which you can calculate statistics
• Tap or 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
• Tap or click the Total row for the added field
• Tap or click the Total arrow to display the Total list
• Select the desired calculation for Access to perform
Querying a Database 46
Calculating Statistics
Querying a Database 47
Calculating Statistics
• Add a field to the query containing statistics for
which you wish to add criteria
• Tap or click the Total row in the desired column
• Tap or click the Total arrow for the added field to
produce a Total list
• Tap or click Where
• Type the criterion in the Criteria row
Querying a Database 48
Using Criteria in Calculating Statistics
Querying a Database 49
Using Criteria in Calculating Statistics
Querying a Database 50
Using Grouping
Querying a Database 51
Crosstab Queries
• Tap or click the Query Wizard button (CREATE tab
| Queries group) to display the New Query dialog
box
• Tap or click Crosstab Query Wizard (New Query
dialog box)
• Tap or 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
Querying a Database 52
Creating a Crosstab Query
Querying a Database 53
Creating a Crosstab Query
• If necessary, tap or click the Shutter Bar
Open/Close Button to open the Navigation Pane
• Tap or click the Navigation Pane arrow to produce
the Navigation Pane menu
• Tap or click the desired option to organize the
Navigation Pane
Querying a Database 54
Customizing the Navigation Pane
Querying a Database 55
Customizing the Navigation Pane
• 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
Chapter Summary
Querying a Database 56
• Join tables in queries
• Create a report and a form from a query
• Export data from a query to another application
• Perform calculations and calculate statistics in
queries
• Create crosstab queries
• Customize the Navigation Pane
Querying a Database 57
Chapter Summary
Chapter 2 Complete
Microsoft
Access 2013

More Related Content

What's hot

Excel Chapter 02
Excel Chapter 02Excel Chapter 02
Excel Chapter 02xtin101
 
Access Chapter 02
Access Chapter 02Access Chapter 02
Access Chapter 02jgardne4
 
Creating a table in ms access
Creating a table in ms accessCreating a table in ms access
Creating a table in ms accessArunodayKatiyar
 
Excel Chapter 03
Excel Chapter 03Excel Chapter 03
Excel Chapter 03xtin101
 
Excel Chapter 01
Excel Chapter 01Excel Chapter 01
Excel Chapter 01xtin101
 
Excel chapter 05
Excel chapter 05Excel chapter 05
Excel chapter 05teeworthy
 
Access Chapter 01
Access Chapter 01Access Chapter 01
Access Chapter 01jgardne4
 
Excel Chapter 03
Excel Chapter 03Excel Chapter 03
Excel Chapter 03jgardne4
 
New Perspectives: Access.02
New Perspectives: Access.02New Perspectives: Access.02
New Perspectives: Access.02Anna Stirling
 
Tài liệu tự học Family trong Revit (phần 4)
Tài liệu tự học Family trong Revit (phần 4)Tài liệu tự học Family trong Revit (phần 4)
Tài liệu tự học Family trong Revit (phần 4)congnghebim
 
Tài liệu tự học Family trong Revit (phần 3)
Tài liệu tự học Family trong Revit (phần 3)Tài liệu tự học Family trong Revit (phần 3)
Tài liệu tự học Family trong Revit (phần 3)congnghebim
 
Tài liệu tự học Family trong Revit (phần 2)
Tài liệu tự học Family trong Revit (phần 2)Tài liệu tự học Family trong Revit (phần 2)
Tài liệu tự học Family trong Revit (phần 2)congnghebim
 
New Perspectives: Access.06
New Perspectives: Access.06New Perspectives: Access.06
New Perspectives: Access.06Anna Stirling
 

What's hot (20)

Excel Chapter 02
Excel Chapter 02Excel Chapter 02
Excel Chapter 02
 
Excel ch06
Excel ch06Excel ch06
Excel ch06
 
Access Chapter 02
Access Chapter 02Access Chapter 02
Access Chapter 02
 
Excel ch07
Excel ch07Excel ch07
Excel ch07
 
Excel ch09
Excel ch09Excel ch09
Excel ch09
 
Excel ch04
Excel ch04Excel ch04
Excel ch04
 
Creating a table in ms access
Creating a table in ms accessCreating a table in ms access
Creating a table in ms access
 
Excel Chapter 03
Excel Chapter 03Excel Chapter 03
Excel Chapter 03
 
Excel ch08
Excel ch08Excel ch08
Excel ch08
 
Excel Chapter 01
Excel Chapter 01Excel Chapter 01
Excel Chapter 01
 
Excel ch05
Excel ch05Excel ch05
Excel ch05
 
Excel chapter 05
Excel chapter 05Excel chapter 05
Excel chapter 05
 
Access Chapter 01
Access Chapter 01Access Chapter 01
Access Chapter 01
 
Excel Chapter 03
Excel Chapter 03Excel Chapter 03
Excel Chapter 03
 
PowerPoint 2013 ch04
PowerPoint 2013 ch04PowerPoint 2013 ch04
PowerPoint 2013 ch04
 
New Perspectives: Access.02
New Perspectives: Access.02New Perspectives: Access.02
New Perspectives: Access.02
 
Tài liệu tự học Family trong Revit (phần 4)
Tài liệu tự học Family trong Revit (phần 4)Tài liệu tự học Family trong Revit (phần 4)
Tài liệu tự học Family trong Revit (phần 4)
 
Tài liệu tự học Family trong Revit (phần 3)
Tài liệu tự học Family trong Revit (phần 3)Tài liệu tự học Family trong Revit (phần 3)
Tài liệu tự học Family trong Revit (phần 3)
 
Tài liệu tự học Family trong Revit (phần 2)
Tài liệu tự học Family trong Revit (phần 2)Tài liệu tự học Family trong Revit (phần 2)
Tài liệu tự học Family trong Revit (phần 2)
 
New Perspectives: Access.06
New Perspectives: Access.06New Perspectives: Access.06
New Perspectives: Access.06
 

Viewers also liked

Viewers also liked (14)

PowerPoint Chapter 03
PowerPoint Chapter 03PowerPoint Chapter 03
PowerPoint Chapter 03
 
Excel SUMIFS Function
Excel SUMIFS FunctionExcel SUMIFS Function
Excel SUMIFS Function
 
PowerPoint Chapter 2
PowerPoint Chapter 2PowerPoint Chapter 2
PowerPoint Chapter 2
 
Microsoft Access 2010 - a jargon free guide
Microsoft Access 2010 - a jargon free guideMicrosoft Access 2010 - a jargon free guide
Microsoft Access 2010 - a jargon free guide
 
D1 Halldór Pálsson
D1 Halldór PálssonD1 Halldór Pálsson
D1 Halldór Pálsson
 
Starting ms access 2010
Starting ms access 2010Starting ms access 2010
Starting ms access 2010
 
Excel 2013 guide book
Excel 2013 guide bookExcel 2013 guide book
Excel 2013 guide book
 
Ms access 2010
Ms access 2010Ms access 2010
Ms access 2010
 
How to Create A Microsoft Access 2007 Database
How to Create A Microsoft Access 2007 DatabaseHow to Create A Microsoft Access 2007 Database
How to Create A Microsoft Access 2007 Database
 
MS Excel 2013
MS Excel 2013MS Excel 2013
MS Excel 2013
 
9780840024220 ppt ch02
9780840024220 ppt ch029780840024220 ppt ch02
9780840024220 ppt ch02
 
9780840024220 ppt ch12
9780840024220 ppt ch129780840024220 ppt ch12
9780840024220 ppt ch12
 
9780840024220 ppt ch10
9780840024220 ppt ch109780840024220 ppt ch10
9780840024220 ppt ch10
 
Chapter 10
Chapter 10Chapter 10
Chapter 10
 

Similar to Access Chapter 02

Similar to Access Chapter 02 (20)

7
77
7
 
Excel chapter 03
Excel chapter 03Excel chapter 03
Excel chapter 03
 
Access.01.ppt
Access.01.pptAccess.01.ppt
Access.01.ppt
 
Word ch10
Word ch10Word ch10
Word ch10
 
Chapter 7 -DescriptiveStatistics and Pivot Table
Chapter 7 -DescriptiveStatistics and Pivot TableChapter 7 -DescriptiveStatistics and Pivot Table
Chapter 7 -DescriptiveStatistics and Pivot Table
 
New Perspectives: Access.09
New Perspectives: Access.09New Perspectives: Access.09
New Perspectives: Access.09
 
Treeview listview
Treeview listviewTreeview listview
Treeview listview
 
11 Organizing Project Details
11 Organizing Project Details11 Organizing Project Details
11 Organizing Project Details
 
Word ch11
Word ch11Word ch11
Word ch11
 
Access 03
Access 03Access 03
Access 03
 
MS ACCESS PPT.pptx
MS ACCESS PPT.pptxMS ACCESS PPT.pptx
MS ACCESS PPT.pptx
 
Ppt2013 ch10
Ppt2013 ch10Ppt2013 ch10
Ppt2013 ch10
 
Ppt2013 ch10
Ppt2013 ch10Ppt2013 ch10
Ppt2013 ch10
 
Microsoft access exercises
Microsoft access exercisesMicrosoft access exercises
Microsoft access exercises
 
06 Excel.pdf
06 Excel.pdf06 Excel.pdf
06 Excel.pdf
 
Understand Charts in Excel - Chapter.03
Understand Charts in Excel - Chapter.03Understand Charts in Excel - Chapter.03
Understand Charts in Excel - Chapter.03
 
05 access howtolookupselect
05 access howtolookupselect05 access howtolookupselect
05 access howtolookupselect
 
Access slide show
Access slide showAccess slide show
Access slide show
 
Excel ch10
Excel ch10Excel ch10
Excel ch10
 
Word ch07
Word ch07Word ch07
Word ch07
 

More from xtin101

PowerPoint Chapter 01
PowerPoint Chapter 01PowerPoint Chapter 01
PowerPoint Chapter 01xtin101
 
Word Chapter 03
Word Chapter 03Word Chapter 03
Word Chapter 03xtin101
 
Word Chapter 02
Word Chapter 02Word Chapter 02
Word Chapter 02xtin101
 
Word Chapter 01
Word Chapter 01Word Chapter 01
Word Chapter 01xtin101
 
Chapter 10 Communications and Networks
Chapter 10 Communications and NetworksChapter 10 Communications and Networks
Chapter 10 Communications and Networksxtin101
 
Chapter 8 Digital Storage
Chapter 8 Digital StorageChapter 8 Digital Storage
Chapter 8 Digital Storagextin101
 
Chapter 09 Operating Systems
Chapter 09 Operating SystemsChapter 09 Operating Systems
Chapter 09 Operating Systemsxtin101
 
Chapter 05 Digital Safety and Security
Chapter 05 Digital Safety and SecurityChapter 05 Digital Safety and Security
Chapter 05 Digital Safety and Securityxtin101
 
Chapter 06 Inside Computers and Mobile Devices
Chapter 06 Inside Computers and Mobile DevicesChapter 06 Inside Computers and Mobile Devices
Chapter 06 Inside Computers and Mobile Devicesxtin101
 
Chapter 3 Computers and Mobile Devices
Chapter 3 Computers and Mobile DevicesChapter 3 Computers and Mobile Devices
Chapter 3 Computers and Mobile Devicesxtin101
 
Chapter 4 Programs and Apps
Chapter 4 Programs and AppsChapter 4 Programs and Apps
Chapter 4 Programs and Appsxtin101
 
Chapter 02 The Internet
Chapter 02 The InternetChapter 02 The Internet
Chapter 02 The Internetxtin101
 
Chapter 01 Digital Literacy
Chapter 01 Digital LiteracyChapter 01 Digital Literacy
Chapter 01 Digital Literacyxtin101
 
Ch12 records management
Ch12 records managementCh12 records management
Ch12 records managementxtin101
 
Ch10 records management
Ch10 records managementCh10 records management
Ch10 records managementxtin101
 
Ch11 records management
Ch11 records managementCh11 records management
Ch11 records managementxtin101
 
Ch09 records management
Ch09 records managementCh09 records management
Ch09 records managementxtin101
 
Ch07 records management
Ch07 records managementCh07 records management
Ch07 records managementxtin101
 
Ch08 records management
Ch08 records managementCh08 records management
Ch08 records managementxtin101
 
Ch06 records management
Ch06 records managementCh06 records management
Ch06 records managementxtin101
 

More from xtin101 (20)

PowerPoint Chapter 01
PowerPoint Chapter 01PowerPoint Chapter 01
PowerPoint Chapter 01
 
Word Chapter 03
Word Chapter 03Word Chapter 03
Word Chapter 03
 
Word Chapter 02
Word Chapter 02Word Chapter 02
Word Chapter 02
 
Word Chapter 01
Word Chapter 01Word Chapter 01
Word Chapter 01
 
Chapter 10 Communications and Networks
Chapter 10 Communications and NetworksChapter 10 Communications and Networks
Chapter 10 Communications and Networks
 
Chapter 8 Digital Storage
Chapter 8 Digital StorageChapter 8 Digital Storage
Chapter 8 Digital Storage
 
Chapter 09 Operating Systems
Chapter 09 Operating SystemsChapter 09 Operating Systems
Chapter 09 Operating Systems
 
Chapter 05 Digital Safety and Security
Chapter 05 Digital Safety and SecurityChapter 05 Digital Safety and Security
Chapter 05 Digital Safety and Security
 
Chapter 06 Inside Computers and Mobile Devices
Chapter 06 Inside Computers and Mobile DevicesChapter 06 Inside Computers and Mobile Devices
Chapter 06 Inside Computers and Mobile Devices
 
Chapter 3 Computers and Mobile Devices
Chapter 3 Computers and Mobile DevicesChapter 3 Computers and Mobile Devices
Chapter 3 Computers and Mobile Devices
 
Chapter 4 Programs and Apps
Chapter 4 Programs and AppsChapter 4 Programs and Apps
Chapter 4 Programs and Apps
 
Chapter 02 The Internet
Chapter 02 The InternetChapter 02 The Internet
Chapter 02 The Internet
 
Chapter 01 Digital Literacy
Chapter 01 Digital LiteracyChapter 01 Digital Literacy
Chapter 01 Digital Literacy
 
Ch12 records management
Ch12 records managementCh12 records management
Ch12 records management
 
Ch10 records management
Ch10 records managementCh10 records management
Ch10 records management
 
Ch11 records management
Ch11 records managementCh11 records management
Ch11 records management
 
Ch09 records management
Ch09 records managementCh09 records management
Ch09 records management
 
Ch07 records management
Ch07 records managementCh07 records management
Ch07 records management
 
Ch08 records management
Ch08 records managementCh08 records management
Ch08 records management
 
Ch06 records management
Ch06 records managementCh06 records management
Ch06 records management
 

Access Chapter 02

  • 2. • 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 Objectives Querying a Database 2
  • 3. • Join tables in queries • Create a report and a form from a query • Export data from a query to another application • Perform calculations and calculate statistics in queries • Create crosstab queries • Customize the Navigation Pane Querying a Database 3 Objectives
  • 4. Querying a Database 4 Project – Querying a Database
  • 5. • Create queries in Design view • Use criteria in queries • Sort data in queries • Join tables in queries • Export query results • Perform calculations in queries • Create a crosstab query • Customize the Navigation Pane Querying a Database 5 Roadmap
  • 6. • Tap or click the ‘Shutter Bar Open/Close Button’ to close the Navigation Pane • Tap or click CREATE on the ribbon to display the CREATE tab • Tap or click the Query Design button (CREATE tab | Queries group) to create a new query • Tap or click the table to add to the query • Tap or click the Add button to add the selected table to the query • Tap or 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 Querying a Database 6 Creating a Query in Design View
  • 7. Querying a Database 7 Creating a Query in Design View
  • 8. • Double-tap or double-click each field to add to the query Querying a Database 8 Adding Fields to the Design Grid
  • 9. Using Text Data in Criterion • Tap or click the Criteria row for the field to produce an insertion point • Type the criterion • Tap or click the Run button (QUERY TOOLS DESIGN tab | Results group) to run the query 9Querying a Database
  • 10. • Tap or click the Save button on the Quick Access Toolbar to display the Save As dialog box • Type the name of the query • Tap or click the OK button (Save As dialog box) to save the query Querying a Database 10 Using Text Data in Criterion
  • 11. • If necessary, tap or 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 (*) Querying a Database 11 Using a Wildcard
  • 12. Querying a Database 12 Using a Wildcard
  • 13. • With the desired query open, tap or click the Show check box to remove the check mark for a field containing criteria Querying a Database 13 Using Criteria for a Field Not Included in the Results
  • 14. Querying a Database 14 Using Criteria for a Field Not Included in the Results
  • 15. • If necessary, return to Design view and type the criterion for a parameter query ([Enter City], for example) • Run the query Querying a Database 15 Creating and Viewing a Parameter Query
  • 16. Querying a Database 16 Creating and Viewing a Parameter Query
  • 17. • Tap or click the Query Design button (CREATE tab | Queries group) to create a new query • Tap or click the table you wish to add to the query • Tap or click the Add button to add the selected table to the query • Tap or 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 Querying a Database 17 Using a Number in a Criterion
  • 18. Querying a Database 18 Using a Number in a Criterion
  • 19. • Open the query in Design view • Enter the criterion with a comparison operator Querying a Database 19 Using a Comparison Operator in a Criterion
  • 20. • Open the query in Design view • Add the criteria for two fields in the Criteria row Querying a Database 20 Using a Compound Criterion Involving AND
  • 21. • 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) Querying a Database 21 Using a Compound Criterion Involving OR
  • 22. • Open the query in Design view • Tap or click just above the column heading in the first column in the grid to select the column • Hold the SHIFT key down and tap or click just above the last column heading to select all the columns • Press the DELETE key to clear the design grid Querying a Database 22 Clearing the Design Grid
  • 23. Querying a Database 23 Clearing the Design Grid
  • 24. • Open the query in Design view • Tap or 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 Querying a Database 24 Sorting Data in a Query
  • 25. • Open the query in Design view • Tap or click an empty field in the design grid • Tap or click the Property Sheet button (QUERY TOOLS DESIGN tab | Show/Hide group) to display the property sheet • Tap or click the Unique Values property box, and then tap or click the arrow that appears to produce a list of available choices • Tap or click Yes and then close the Query Properties property sheet by tapping or clicking the Property Sheet button (QUERY TOOLS DESIGN tab | Show / Hide group) a second time Querying a Database 25 Omitting Duplicates
  • 26. Querying a Database 26 Omitting Duplicates
  • 27. • Open the query in Design view • Select a sort order in the Sort column for multiple fields Querying a Database 27 Sorting on Multiple Keys
  • 28. • Open the query in Design view • Click the Return arrow (QUERY TOOLS DESIGN tab | Query Setup group) to display the Return menu • Tap or click an option corresponding to the values you wish to return Querying a Database 28 Creating a Top-Values Query
  • 29. Querying a Database 29 Joining Tables
  • 30. • Tap or 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 Querying a Database 30 Joining Tables
  • 31. Querying a Database 31 Joining Tables
  • 32. Querying a Database 32 Joining Tables
  • 33. • Open the query in Design view • Press and hold or right-click the join line to produce a shortcut menu • Tap or click Join Properties on the shortcut menu to display the Join Properties dialog box Querying a Database 33 Changing Join Properties
  • 34. Querying a Database 34 Changing Join Properties
  • 35. • Open the Navigation Pane, and then select the desired query in the Navigation Pane • Tap or click the Report Wizard button (CREATE tab | Reports group) to display the Report Wizard dialog box • Add the desired fields to the query • Follow the remaining steps in the wizard to specify a grouping, sort order, layout and orientation, and title • Tap or click the Finish button to produce the report Querying a Database 35 Creating a Report from a Query
  • 36. Querying a Database 36 Creating a Report from a Query
  • 37. • Select the query in the Navigation Pane • Tap or click the Form button (CREATE tab | Forms group) to create a simple form Querying a Database 37 Creating a Form for a Query
  • 38. • Tap or click the desired query in the Navigation Pane to select it • Tap or click the Excel button (EXTERNAL DATA tab | Export group) to display the Export - Excel Spreadsheet dialog box • Tap or click the Browse button (Export - Excel Spreadsheet dialog box) to display the File Save dialog box • Navigate to the location to save the exported file • Tap or click the OK button (Export - Excel Spreadsheet dialog box) to export the data Querying a Database 38 Exporting Data to Excel
  • 39. • Tap or click the ‘Save export steps’ check box (Export - Excel Spreadsheet dialog box) to display the Save Export Steps options • Type the desired name for the steps in the Save as text box • If necessary, type a description for the export steps • Tap or click the Save Export button (Export - Excel Spreadsheet dialog box) to save the export steps Querying a Database 39 Exporting Data to Excel
  • 40. Querying a Database 40 Exporting Data to Excel
  • 41. • Open the query containing a join • Type the criterion for the desired field Querying a Database 41 Restricting the Records in a Join
  • 42. • Open the query in Design view containing a field that can be calculated • Press and hold or right-click the Field row in the first open column in the design grid to display a shortcut menu • Tap or click Zoom on the shortcut menu to display the Zoom dialog box • Type the calculation in the Zoom dialog box • Tap or click the OK button (Zoom dialog box) to enter the expression Querying a Database 42 Using a Calculated Field in a Query
  • 43. Querying a Database 43 Using a Calculated Field in a Query
  • 44. • Open the query in Design view • Tap or click the field in the design grid to which you wish to add the caption, and then tap or click the Property Sheet button (QUERY TOOLS DESIGN tab | Show/Hide group) to display the properties for the field • Tap or click the Caption box, and then type the desired caption • Close the property sheet by tapping or clicking the property Sheet button a second time Querying a Database 44 Changing a Caption
  • 45. Querying a Database 45 Changing a Caption
  • 46. • Create a new query for a table containing fields for which you can calculate statistics • Tap or 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 • Tap or click the Total row for the added field • Tap or click the Total arrow to display the Total list • Select the desired calculation for Access to perform Querying a Database 46 Calculating Statistics
  • 47. Querying a Database 47 Calculating Statistics
  • 48. • Add a field to the query containing statistics for which you wish to add criteria • Tap or click the Total row in the desired column • Tap or click the Total arrow for the added field to produce a Total list • Tap or click Where • Type the criterion in the Criteria row Querying a Database 48 Using Criteria in Calculating Statistics
  • 49. Querying a Database 49 Using Criteria in Calculating Statistics
  • 50. Querying a Database 50 Using Grouping
  • 51. Querying a Database 51 Crosstab Queries
  • 52. • Tap or click the Query Wizard button (CREATE tab | Queries group) to display the New Query dialog box • Tap or click Crosstab Query Wizard (New Query dialog box) • Tap or 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 Querying a Database 52 Creating a Crosstab Query
  • 53. Querying a Database 53 Creating a Crosstab Query
  • 54. • If necessary, tap or click the Shutter Bar Open/Close Button to open the Navigation Pane • Tap or click the Navigation Pane arrow to produce the Navigation Pane menu • Tap or click the desired option to organize the Navigation Pane Querying a Database 54 Customizing the Navigation Pane
  • 55. Querying a Database 55 Customizing the Navigation Pane
  • 56. • 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 Chapter Summary Querying a Database 56
  • 57. • Join tables in queries • Create a report and a form from a query • Export data from a query to another application • Perform calculations and calculate statistics in queries • Create crosstab queries • Customize the Navigation Pane Querying a Database 57 Chapter Summary