Presentation is loading. Please wait.

Presentation is loading. Please wait.

McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. Office Access 2003 Lab 3 Analyzing Data and Creating Reports.

Similar presentations


Presentation on theme: "McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. Office Access 2003 Lab 3 Analyzing Data and Creating Reports."— Presentation transcript:

1 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. Office Access 2003 Lab 3 Analyzing Data and Creating Reports

2 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-2 Objectives 1.Filter table records 2.Create and modify a query. 3.Move columns. 4.Query two tables. 5.Create reports from tables and queries.

3 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-3 Objectives continued 6.Modify a report design. 7.Select, move, and size controls. 8.Change paper margins. 9.Preview and print a report. 10.Compact and back up a database.

4 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-4 Concept Preview Filter Query Join Report Control

5 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-5 Outline Filtering Records –Using Filter by Selection –Using Filter by Form

6 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-6 Outline continued Querying a Database –Using a Query Wizard –Moving Columns –Modifying and Saving a Query –Creating a Query in Design View –Querying Two Tables –Finding Unmatched Records –Adding a Second Table to the Query

7 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-7 Outline continued Creating a Report from a Table –Using the AutoReport Wizard –Using the Report Wizard –Modifying the Report Design –Selecting the Report Design –Moving Controls –Sizing Controls –Previewing the Report Layout

8 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-8 Outline continued Creating a Report from a Query Previewing and Printing Reports –Changing Page Margins –Printing an Entire Report –Printing a Selected Page of the Report Compacting and Backing Up the Database

9 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-9 Outline Concept Summary Lab Review Lab Exercises

10 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-10 Filtering Records Doing sorts to find information can be time consuming A faster way to locate information in Access is to apply a filter to the table records

11 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-11 Restriction placed on records Quickly isolates and displays a subset of records You specify a criteria –Limiting conditions –Temporary Filter Filter results can't be saved Filter criteria is saved with the table Concept 1 Filter

12 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-12 Using Filters Filter by Selection –Displays only records containing a specific value –Effective when only one value is needed –Other records are temporarily hidden Filter by Form –Performs filters on multiple criteria –Look For tab –Or tab

13 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-13 Using Filters Criteria expression –Typing a value directly in its corresponding field –Select value from drop down list OR operator AND operator ( homework)

14 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-14 Filter by Selection Filter by selection Filter displays only those record meeting the criteria of city of Maldin

15 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-15 Filter by Form

16 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-16 Querying A Database A query is a request for information View data in different ways Analyze data Change existing data Can be used as a source for forms and reports

17 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-17 Query TypeDescription Select queryRetrieves specific information Crosstab querySummarizes large amount of data Parameter query Prompts for criteria information Action queryMakes changes to many records SQL queryAdvanced query using Structured Query Language Concept 2 Query

18 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-18 Action Query Make-Table Query. Delete Table Query. Append Table Query. An update Table Query.

19 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-19 SQL Queries An SQL query is a query you create by using an SQL statement. You can use Structured Query Language (SQL) to query, update, and manage relational databases such as Microsoft Access. SQL Select SQL where.

20 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-20 Ways to Create a Query 5 methods to create queries

21 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-21 Using a Query Wizard Query WizardType of Query Created SimpleSelect query CrosstabCrosstab query Find Duplicates Locates duplicate values in one or more fields Find Unmatched Locates records in one table that do not have records in another

22 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-22 Using a Query Wizard Steps 1.Select underlying table and fields 2.Specify a name for your query 3.Select to open as is or in Design view

23 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-23 Simple Query Specify fields to include in query output Underlying table to be used as the data source

24 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-24 Adding Fields to the Query Adds all fields Adds field Removes field Removes all fields 5 fields to include in query output

25 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-25 Query Datasheet Query datasheet displays 5 selected fields for all records

26 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-26 Moving Columns Last Name column moved

27 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-27 Modifying a query To modify a query, you make changes in the Query Design view window The Design window has two areas –Upper area includes Field list –Lower area includes Design grid Column selector Row label Cell Show boxes

28 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-28 Query Design View Window Raw labels Column selector bar Design grid Cell Employee Records table field list Checked Show box indicates the field will be displayed in query results

29 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-29 Using an Expression Runs query Criteria expression enclosed in quotation marks

30 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-30 Query Database Display Query database displays all records with a city field of Maldin

31 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-31 Creating a Query in Design View Select table to use as data source

32 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-32 Selecting Fields for Query Select fields from field list to add to grid

33 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-33 Using an Expression Data criterion entered <=1/1/00

34 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-34 Records Meeting Criteria Employees hired on or before 01/01/2000 Records meeting criteria

35 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-35 Saving Queries Saved Queries

36 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-36 Querying Two Tables

37 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-37 An association between a field in one table or query and a field in another table or query –Must have at least one common field –Fields must be the same data type Used to bring information from different tables together Joins are what make relational databases so powerful Concept 3 Join

38 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-38 Finding Unmatched Records Selected table is searched for records

39 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-39 Finding Unmatched Records Matching field is selected in the two tables

40 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-40 Finding Unmatched Records Two records are found that are missing from Clubs table

41 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-41 Adding a Second Table to the Query Add table to query

42 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-42 Join Join line links common field

43 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-43 Adding Fields to Join Field from second table added to grid Criteria entered

44 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-44 Run the Query Records are a result of the combination of fields from both tables

45 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-45 Joins Join TypeDescription Inner join Checks records for matching values and displays them as one record in the query results. Outer join One table contributes all of its records even if the values in its joined field do not math those in the other table. SQL join Records to be included are based on the value in one join field being greater than, equal to, etc. the value in the other join field

46 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-46 Creating a Report from a Table

47 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-47 Printed output generated from tables or queries All fields or selected fields Can be based on a table or query Can customize: –Text formats –Styles –Layouts –Grouping –Summary information Concept 4 Report

48 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-48 Report Types Columnar report –Simplest type –Lists every field for every record in a single column. Tabular report –Displays selected fields in a row –One record per row

49 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-49 Columnar Report Tabular Report

50 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-50 Anatomy of a Report Report header & footer Header: at the beginning of the report,it contains information describing the report Footer: at the end of the report, it displays summary information for the report. Page header & footer Header: appears at the top of every page in a report ( page number, column heading). Footer: appears at the bottom of every page in a report Group header & footer Header: appears at the beginning of a group of records. Footer: appears after the last record in a group. Detail section main body

51 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-51 Report Print Preview Report Header Page Header Detail Section

52 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-52 Report Design View (1 of 2) Bound Controls –Data source is a field in the table/query Unbound Controls –Has no data source –Used to display titles, labels, lines, rectangles, and graphics Calculated Controls –Data source is an expression (avg, sum)

53 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-53 Report Design View (2 of 2) Report Header Page Header Detail Section Page footer Toolbox

54 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-54 Creating a Report Specify table or query as source for the report 6 methods to create a report

55 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-55 Using the AutoReport Wizard Report title Report displayed in Print Preview Columnar report displays each field on a separate line

56 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-56 Fit to Windows Photo placeholder

57 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-57 Previewing Multiple Pages One record per page

58 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-58 Using the Report Wizard Specify tables/queries and fields to use in reports

59 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-59 Grouping the Data

60 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-60 Selecting Sort and Sort Order

61 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-61 Report Layout & Orientation Creates a tabular layout report in portrait orientation

62 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-62 Report Style

63 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-63 Completed Report Tabular report in Corporate style Field names

64 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-64 Creating Reports AutoReport Wizard Report Wizard What's the difference between the two wizards?

65 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-65 Modifying the Report Design Open the Report Design View –Used to create and modify the structure of a report –Displays three toolbars Report Design Formatting Toolbox –Field List box contains fields that can be added to the report

66 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-66 Modifying the Report Field List box Toolbox toolbar Report Design toolbar Formatting toolbar

67 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-67 Report Controls

68 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-68 Modifying the Reports Design SectionDescription Report HeaderContains information to be printed once at the beginning of the report. Page HeaderContains information to be printed at the top of each page. DetailContains the records of the table. Page FooterContains information to be printed at the bottom of each page. Report FooterContains information to be printed at the end of the report.

69 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-69 Controls are objects on a form or report –Display information –Perform actions –Enhance the design Two basic types of controls: –Bound –Unbound Concept 5 Control Last NameSmith Unbound labelBound text box

70 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-70 Access Objects With Controls Labels Text boxes Check boxes List boxes Command buttons Lines Rectangles Option buttons

71 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-71 More on Controls Selecting controls Moving controls Sizing controls

72 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-72 Selecting Controls Move handles Selected label and text box controls

73 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-73 Moving Controls Label and text box controls moved Shape to move control

74 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-74 Sizing Controls Control sized to display contents

75 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-75 Previewing the Report Layout Layout Preview displays only some of the records

76 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-76 Creating a Report From a Query

77 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-77 Report based on a Query

78 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-78 Previewing and Printing Reports

79 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-79 Other Print Features Change page margins Print a selected page of a report

80 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-80 Compacting and Backing up the Database Makes a copy of the file Rearranges how the file is stored on disk Makes database perform optimally Compacting is important because : –Database becomes fragmented due to deletes –Space not used efficiently Backup your databases periodically

81 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-81 Key Terms AND operator bound control column selector bar common field compact control criteria criteria expression design grid field list filter

82 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-82 Key Terms continued Filter by Form Filter by Selection join join line margin move handle multitable query OR operator query query datasheet

83 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-83 Key Terms continued report row label Show box sizing handles unbound control

84 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-84 FAQs 1.What's the difference between Filter by Selection and Filter by Form? 2.How do I remove a filter? 3.What is required to create a query? 4.I created a query, and entered a criteria, but no records were selected. Did I do something wrong?

85 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-85 FAQs 5.Running a query does not save the results, but I want to run my query again. What should I do? 6.What is a join and when should I use a one? 7.What is the difference between forms and reports?

86 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-86 FAQs 8.I am not sure how to create a report. What should I do? 9.I want to change my report. What do I need to know about the controls? 10.I created a report and want to print out the first few pages. How can I do this?

87 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-87 Discussion Questions 1.Discuss what filters are and how they can be used in a database. When would it be appropriate to use a filter? 2.Discuss the differences between the AND and OR filter conditions.

88 McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. 3-88 Discussion Questions 3.Discuss what a query can do and some advantages of using queries. 4.Discuss the different types of controls. Give an example of how they can be used to create different report designs.


Download ppt "McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. Office Access 2003 Lab 3 Analyzing Data and Creating Reports."

Similar presentations


Ads by Google