Presentation is loading. Please wait.

Presentation is loading. Please wait.

McGraw-Hill/Irwin The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Access 2002 Lab 3 Analyzing Tables and Creating.

Similar presentations


Presentation on theme: "McGraw-Hill/Irwin The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Access 2002 Lab 3 Analyzing Tables and Creating."— Presentation transcript:

1 McGraw-Hill/Irwin The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Access 2002 Lab 3 Analyzing Tables and Creating Reports

2 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 2 McGraw-Hill/Irwin Objectives 1.Filter table records. 2.Create a query. 3.Move columns. 4.Query two tables. 5.Create a report. 6.Modify a report design. 7.Print a selected page.

3 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 3 McGraw-Hill/Irwin Concepts 1.Filter - A filter is a restriction placed on records in the open datasheet or form to temporarily isolate and display a subset of records. 2.Query - A query is a request for specific data contained in a database. Queries are used to view data in different ways, to analyze data, and even to change existing data. 3.Join - A join is an association between a field in one table or query and a field of the same data type in another table or query.

4 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 4 McGraw-Hill/Irwin Concepts 4.Report - A report is printed output generated from tables or queries. 5.Controls - Controls are objects on a form or report that display information, perform actions, or enhance the design.

5 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 5 McGraw-Hill/Irwin Outline Filtering Records –Using Filter by Selection –Using Filter by Form Querying a Database –Creating a Query Using a Query Wizard –Moving Columns –Modifying a Query –Creating a Query in Design View –Querying Two Tables

6 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 6 McGraw-Hill/Irwin Outline Creating Reports –Using the AutoReport Wizard –Zooming the Report –Using the Report Wizard Modifying the Report Design –Selecting Controls –Moving Controls –Sizing Controls

7 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 7 McGraw-Hill/Irwin Outline Printing a Report –Changing Page Margins –Printing a Selected Page Creating a Report from a Query Compacting the Database Lab Review

8 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 8 McGraw-Hill/Irwin 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

9 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 9 McGraw-Hill/Irwin 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 –Perform filters on multiple criteria –Look For tab –Or tab

10 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 10 McGraw-Hill/Irwin USING FILTERS Criteria expression –Create one or… –Select value from drop down list AND operator OR operator

11 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 11 McGraw-Hill/Irwin QUERYING A DATABASE A query is a request for information View data in different ways Analyze data Can change existing data Used as a source for forms and reports

12 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 12 McGraw-Hill/Irwin 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

13 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 13 McGraw-Hill/Irwin Query WizardType of Query Created SimpleSelect query CrosstabCrosstab query Find DuplicatesLocates duplicate values in one or more fields Find UnmatchedLocates records in one table that do not have records in another CREATING A QUERY The Query Wizard

14 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 14 McGraw-Hill/Irwin 1.Select underlying table and fields 2.Specify a name for your query 3.Select to open as is or in Design view USING A QUERY WIZARD Steps

15 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 15 McGraw-Hill/Irwin Query Design window –Field list –Design grid –Column selector –Row label –Cell –Show boxes MODIFYING A QUERY

16 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 16 McGraw-Hill/Irwin CREATING A QUERY IN DESIGN VIEW

17 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 17 McGraw-Hill/Irwin Concept 3: JOIN An association between a field in one table and a field in another table –Field must be same data type Common fields –Queries can be joined Used to bring information from different tables together Joins are the power of relational databases

18 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 18 McGraw-Hill/Irwin JOINS Join TypeDescription Inner join Checks records for matching values and displays them as one record in the query results. Outer join Each matching record from two tables is combined into one record in the query results. SQL join Include all records from one table and only those records from a second table where the joined fields are equal.

19 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 19 McGraw-Hill/Irwin Concept 4: REPORT 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

20 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 20 McGraw-Hill/Irwin CREATING REPORTS AutoReport Wizard Report Wizard What's the difference?

21 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 21 McGraw-Hill/Irwin 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. MODIFYING THE REPORTS DESIGN

22 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 22 McGraw-Hill/Irwin Concept 5: CONTROL Controls are objects on a form or report –Display information –Perform actions –Enhance the design Two basic types of controls: –Bound –Unbound

23 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 23 McGraw-Hill/Irwin Labels Text boxes Check boxes List boxes Command buttons Lines Rectangles Option buttons ACCESS OBJECTS HAVING CONTROLS

24 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 24 McGraw-Hill/Irwin MORE ON CONTROLS Selecting controls Moving controls Sizing controls

25 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 25 McGraw-Hill/Irwin PRINTING A REPORT Changing page margins Printing a selected page

26 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 26 McGraw-Hill/Irwin CREATING A REPORT FROM A QUERY

27 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 27 McGraw-Hill/Irwin 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 COMPACTING THE DATABASE

28 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 28 McGraw-Hill/Irwin AND operator – Narrows a search because a record must meet both conditions Bound control – A control that is linked to a field in an underlying table. Cell – Space created by the intersection of a vertical column and a horizontal row. Column selector bar – The thin gray bar just above the field name in the grid in Query Design view. Key Terms

29 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 29 McGraw-Hill/Irwin Key Terms Common field – A field that is found in two or more tables. Compact – Making a copy of a database file for optimal performance. Controls - In Form and Report Design views, information such as text boxes that tell Access where to place data and text. Criteria – A set of limiting conditions. Criteria expressions - An expression that will select only the records that meet certain limiting criteria.

30 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 30 McGraw-Hill/Irwin Key Terms Design grid - The lower part of the Query Design window, which displays settings that are used to define the query. Field list - A small window that lists all fields in an underlying table. Filter - A restriction placed on records in an open form or datasheet to temporarily isolate a subset of records. Filter by Form - This feature provides a blank version of the current form or datasheet.

31 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 31 McGraw-Hill/Irwin Key Terms Filter by Selection - A type of filter that displays only records containing a specific value. Join - Creates a relationship between tables by linking common fields in multiple tables. Join line - In the Query Design window, the line that joins the common fields in multiple tables. Margin - The blank space around the edge of a page. Move handle - A large box used to move a control picture. Multi-table query - A query that uses more than one table.

32 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 32 McGraw-Hill/Irwin Key Terms OR operator - Any record meeting either condition is included in a search. Query - Used to view data in different ways, to analyze data, and to change data. Query datasheet – Where the result or answer to a query is displayed. Report – Printed output generated from tables or queries. Report Design view – Used to create and modify the structure of a report. Row label – Specifies the type of information that can be entered in a query.

33 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 33 McGraw-Hill/Irwin Key Terms Show box – Used to display a field in a query result. Sizing handles – Small boxes used to size an object. Unbound control – Text not connected to a field.

34 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 34 McGraw-Hill/Irwin 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. 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.

35 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 35 McGraw-Hill/Irwin Frequently Asked Questions What's the difference between Filter by Selection and Filter by Form? How do I remove a filter? What is required to create a query? I created a query, but nothing happens. Did I forget to do something?

36 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 36 McGraw-Hill/Irwin Frequently Asked Questions When would I use a crosstab query? Running a query does not save the results, but I want to run my query again. What should I do? When would I use a join? What is the difference between forms and reports?

37 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 37 McGraw-Hill/Irwin FAQ cont. I am not sure how to create a report. What should I do? I want to change my report. What do I need to know about the controls? I printed a report and some of the pages are blank. What should I do?

38 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 38 McGraw-Hill/Irwin Web Links Access – Linked Tables –http://msdn.microsoft.com/library/officedev/off ice97/ORKht/T.HTMhttp://msdn.microsoft.com/library/officedev/off ice97/ORKht/T.HTM Access Utility Library – Shareware –http://www.emsps.com/access.htmhttp://www.emsps.com/access.htm MS Access Tutorials – Parameter Queries –http://mis.bus.sfu.ca/tutorials/MSAccess/tutoria ls/param.pdfhttp://mis.bus.sfu.ca/tutorials/MSAccess/tutoria ls/param.pdf

39 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 39 McGraw-Hill/Irwin Web Links MS ACCESS Tutorial – Creating Database Relationships in Access –http://databases.miningco.com/compute/databas es/library/weekly/aa031801a.htmhttp://databases.miningco.com/compute/databas es/library/weekly/aa031801a.htm MS Access Tutorial - Creating a Report in Access –http://databases.miningco.com/compute/databas es/library/weekly/aa122400a.htmhttp://databases.miningco.com/compute/databas es/library/weekly/aa122400a.htm

40 The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 40 McGraw-Hill/Irwin Web Links Filters and Queries – Access –http://mis.commerce.ubc.ca/courses/comm391/t utorials/access1/access1.htmhttp://mis.commerce.ubc.ca/courses/comm391/t utorials/access1/access1.htm MS Access – Queries –http://www1.harlingen.isd.tenet.edu/images/hel ppages/MSAccessTutorials.htmlhttp://www1.harlingen.isd.tenet.edu/images/hel ppages/MSAccessTutorials.html Gaining Access – What is a Query? –http://www.psu.edu/dept/cac/ets/projects/modul es/ga/query_index.htmlhttp://www.psu.edu/dept/cac/ets/projects/modul es/ga/query_index.html


Download ppt "McGraw-Hill/Irwin The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Access 2002 Lab 3 Analyzing Tables and Creating."

Similar presentations


Ads by Google