SlideShare ist ein Scribd-Unternehmen logo
1 von 86
Downloaden Sie, um offline zu lesen
Orange Coast Database Associates Course                                     (800)355-9855 or http://www.dhdursoassociates.com



                           AIN106 Introduction to Microsoft
                           Access Reports and Analysis




                  Orange Coast
                Database Associates




                             Specializing in Microsoft Office,
                           Access, SQL, and related technologies
                              Classes custom designed for Working Professionals
                                              http://www.dhdursoassociates.com
                                                  San Juan Capistrano, CA
                                                      (800)355-9855




Accelerated Computer Training for Working Professionals                                                     Factory 2010 Case
AIN106 - Introduction to Access


                   Quick introduction to Access for
                   experienced Windows users



    P.O. Box 6142
    Laguna Niguel, CA 92607
    949-489-1472
    http://www.dhdursoassociates.com
    slides.1@dhdursoassociates.com
1                                      Factory            AIN106




         AIN106 - Introduction to Access

            Introduction (s)
            Facilities
            Course Materials (Varies by class)
               –   Student Questionnaire
               –   PowerPoint handouts for all sessions
               –   Evaluation form
               –   Training certificate
               –   Collaterals (Maps, Catalogs, etc.)




2                                        AIN106               Factory
MS Access Introductory (100 Level)
    Standard Curriculum


                      AIN100
     AIN100T                 Incl. A & B
                  AIA101


                      AIN104
        AIN102                             AMP110
                      Reports
        Queries                            Macros
                      & Forms


3                   AIN106                          Factory




    MS Access Introductory (100 Level)
    Specialized Curriculum


                      AIN100

                      Incl. A & B




                      AIN106
         TBD
                      Reports               TBD
                     & Analysis


4                   AIN106                          Factory
AIN106 – Introduction to Access

       Quick pace for experienced windows users
       Assumes no prior knowledge of Access
       End-user, not programmer, oriented
       Somewhat structured towards personal use for
        analysis and reporting




5                          AIN106 V1.2           Factory




        AIN106 - Introduction to Access
        Course Topics:
                     Databases
                     Tables
                     Datasheet
                     External Data
                     Queries
                     Reports
                     Criteria Selection Forms




6                            AIN106              Factory
Introduction to Access
      Industry Standard Approach:

    Access has many ways to accomplish tasks. As an accelerated
    course we will cover only the most common.

          Tables                Table Designer
          Queries               Query designer
          Reports               Wizard then modify
          Forms                 Wizard then modify
          Macros                Macro Designer

7                          AIN106                           Factory




          AIN106 - Introduction to Access
      Course Format:

         2 Sessions
         Lecture
         Demo
         Student “hands-on” - by the end of the
          class the student will have constructed a
          small, functional application
         Exercises are cumulative – later examples
          build on objects created earlier


8                          AIN106                           Factory
Database Design – Critical Topic


        What do I want?
          –   (Outputs - Reports)


        What have I got?
          –   (Inputs – Tables, Import data)

        What do I need to do to get
         there?
          –   (Processes, Queries)



9                                   AIN106                                      Factory




                        Note: we have a full day course (DBD201) on this important topic.


     Understand your database

        Draw a                                 PRODUCTS
         picture
        Write a
         description                            ORDERS

        Plan your
         queries
                                                                        C.C.
                                        EMPLOYEES                       Toys




10                                  AIN106                                      Factory
AIN106 - Introduction to Access
      Course Schedule (3 hour sessions):
           Session 1
            –   Tables and Data
            –   Starting Queries
           Session 2
            –   Queries
            –   Reports
            –   Criteria Selection Forms




11                            AIN106       Factory




     Notes




12                            AIN106       Factory
Microsoft Access



             Module


             Introduction to Access, Tables and
             Data




1                               Factory               Access Introduction v1.02




                           Module Outline
        Three parts:



                 Part 1: Introduction & Tables
                 Part 2: Manipulating and Sorting Tables
                 Part 3: Table Relationships




    2                     Access Introduction v1.02                          Factory
Module Hands On
        Students   “hands-on”:

              –   Create a database based on Factory
                  2000 case
              –   Create 3 tables (w/validation rules
                  and masks)
              –   Populate tables
              –   Sort & Manipulate tables
              –   Create table relationships (permanent
                  links)


    3                        Access Introduction v1.02                          Factory




                             Introduction to Access




            Module Part 1:


            Introduction to Access and Tables




4                                  Factory               Access Introduction v1.02
Access Modes


       Menu-driven interface - Interact with a database
        and its objects using menu commands

       Program mode - Lets you store instructions in a VBA
        program file

       This course concentrates on the menu interface but
        does cover macros which can be used to “program” a
        series of actions

5                     Access Introduction v1.02         Factory




    Relational Database Concepts
       Most prominent type of database – Access is a
        Relational Database
       Based on set theory (Mathematically based)
       A table is a relation between columns and rows
       Each row must be unique
       Each column may contain only one type of data and
        must have a unique name
       Each data element may contain only one value
       Information from multiple tables can be combined
        using a column of common information


6                     Access Introduction v1.02         Factory
Database Terminology


       Database – in Access an “.mdb” file in which
        tables, reports, queries, and other objects
        are stored
       Table – stores facts about one subject
        (entity)
       Record - contains related information about
        one entity “instance”
       Field - contains a fact about an entity
7                     Access Introduction v1.02             Factory




               Database Terminology               (cont.)




       Key - used to order, identify, and retrieve records
        in the database
       Primary key - unique identifier for a particular
        record. Only one per table.
       Index – Internal structure that speeds up searches
        and joins. Also used to enforce uniqueness. Can have
        several per table.
       Table structure - the arrangement of information
        within a record, the type of characters, field
        length, limitations, etc.


8                     Access Introduction v1.02             Factory
Database Terminology                      (cont.)




        Form - paper-like method of accessing and entering
         data in a table
        Query – retrieves information from Access tables
        Report - provides the ability to arrange table data
         as well as to perform calculations and then print a
         paper-based report
        Object – used in database world as generic term for
         queries, reports, indexes, tables, etc. Not the same
         as programming object.
9                      Access Introduction v1.02                     Factory




     Sample Case – Factory2000

                                Implement a simple cost
                                 accounting application
                                Employees work on work
                                 orders
                                   –   Clock labor hours worked for each
                                       work order
                                   –   Only one labor ticket per
                                       employee per work order
                                   –   Each work order has a standard
                                       time budget
                                Some data periodically
                                 imported and/or exported
10                     Access Introduction v1.02                     Factory
Existing Method of Recording
                 Factory2000 Labor Hours


     EmpNo fName              lName          Rate           Wono       Descr        Hours
     12          Bob          Smith          15             A1         Casting 12
     13          Mary         Chavez         20             A1         Casting 22
     14          Alicia       Parks          25             B3         Ass’ly       15
     14          Alicia       Parks          25             C2         Screws 18



     This what is called a “flat file”. What problems do you see
     with this approach?

11                            Access Introduction v1.02                                    Factory




Factory2000 Relational Database Structure


          EmpNo      fName     lName         Rate               Wono      Descr      Std
          12         Bob       Smith         15                 A1        Casting 30

          13         Mary      Chavez        20                 B3        Fitting    50

          14         Alicia    Parks         25                 C2        Screws 70

     employees                                                                      Work_orders
                   EmpNo       Wono         Start         End        Hours
                   12          A1           1/1/01        1/31/01    20

                   14          C2           2/1/01        2/28/01    42
        Labor
                   14          B3           1/1/01        2/28/01    40

12                            Access Introduction v1.02                                    Factory
Creating a Database


        Ways to create a database
         – Create a database using an Access
           template or Wizard – (not always
           recommended)

         –       Create a blank database and then insert
                 your own objects – we will use this
                 method in this course


13                        Access Introduction v1.02                  Factory




                        Creating a Table


         Click new from tables tab
         Naming a Table
             –    Up to 64 “standard” characters can be used
             –    Do not use an extension
             –    No leading spaces or control characters, in fact
                  try to avoid spaces altogether
         Add fields one by one
         Set Field Properties in Field Properties
          box



14                        Access Introduction v1.02                  Factory
Designing Fields


        Field Type – text, datetime, number, etc.
        Field Width – 10 characters, etc.
        Caption – “Column title” for display
        Format – Determines how the field is displayed
         (long date, short date, etc.)
        Click toolbar key symbol to make primary key
        Set indexed for secondary keys, required, etc.


15                   Access Introduction v1.02        Factory




                     Table Designer




16                   Access Introduction v1.02        Factory
Hands On - Create Table Structures



                   Employees
                   Work_Orders
                   Labor




17              Access Introduction v1.02                  Factory




           Employees Table Definition
                    (Instructor led)



                   EmpNo           text(2), primary key
                   Fname           text(10)
                   Lname           text (15), required
                   Rate            currency, required
                   MgrNo           text(2)

                         Add captions, too

18              Access Introduction v1.02                  Factory
Work_Orders Table Definition
               (On Your Own)



           WoNo           text(2), primary key
           Descr          text(15)
           StdHrs         number(single,2), required
           Accum          number(single,2), required


                  Add captions, too


19            Access Introduction v1.02                 Factory




        Labor Table Definition
               (On Your Own)



           EmpNo           text(2), primary key
           WoNo            text(2), primary key
           Start           datetime, required
           End             datetime
           Hours           number(single,2)


                       Add captions, too

20            Access Introduction v1.02                 Factory
Field Validation & Masks


                      Add some validations
                        – Require start date
                        – End >= start date
                        – Etc.
                      Add some input masks & formats




21                     Access Introduction v1.02        Factory




                             Datasheets


        Datasheet window - displays the contents of a table
         in a spreadsheet-like format
          – Each row contains a record
          – Each column contains a field
        Speedbar - appears at the bottom of the window
         and is used to navigate through the records in a
         table



22                     Access Introduction v1.02        Factory
Datasheet View




23        Access Introduction v1.02       Factory




     Entering & Editing Records



             Enter table data from the
              handouts




24        Access Introduction v1.02       Factory
Employees Table Data




25       Access Introduction v1.02   Factory




     Work_Orders Table Data




26       Access Introduction v1.02   Factory
Labor Table Data




                      To be added later




27                Access Introduction v1.02                          Factory




           Introduction to Access


     Module Part 2:


     Manipulating and Sorting Tables




28                      Factory               Access Introduction v1.02
Printing a Table


        Access allows you to create “quick and dirty”
         reports by clicking the toolbar Print button
          – A row/column presentation is used
          – Field names appear along the top
          – Records are rows
          – Fields are columns
          – A grid is printed around each field



29                     Access Introduction v1.02           Factory




                        Quick Reports



            Report Wizard
             –   Module 2 covers reports
             –   For now, be aware a quick report can be
                 produced using the report wizard




30                     Access Introduction v1.02           Factory
Manipulating the Datasheet


             Gridlines – controlled by Cells Effects
              dialog box
             Can control background color, fonts,
              etc.
             Fields can be resized and moved
             Also, hidden and locked like a
              spreadsheet

31                     Access Introduction v1.02        Factory




                        Record Pointer

        Record pointer (thick black arrow head) helps you
         keep track of where you are in a table
        The character is used in the left-hand table cells
         to indicate the pointer location
        The pointer moves by using keyboard, scrollbar, or
         speedbar commands
        => Changes are saved when you move to next record



32                     Access Introduction v1.02        Factory
Find Command

        Use the Edit | Find command sequence or
         click the Find toolbar button

        Either command activates the Find in field
         dialog box

        Searches can have “Wildcards” (in fact
         sophisticated Unix style searches are available)


33                     Access Introduction v1.02            Factory




                       One Field Sort


        Select the column to be used in the sort

        Click the desired Sort Ascending or
         Descending toolbar button




34                     Access Introduction v1.02            Factory
Multiple Field Sort

         Filter - used to sort data or restrict
          records shown
         Use Records | Filter | Advanced Filter/Sort
          command sequence
         Activates the filter window
         Specify the fields and sort order
         Execute by clicking the Apply Filter/Sort
          button of the toolbar

35                     Access Introduction v1.02                          Factory




                  Introduction to Access



     Module Part 3:
     Table Relationships




36                           Factory               Access Introduction v1.02
Relating Tables


        Command sequence – Tools | Relationships
        Parent table - table used as the main table
         for a relationship
        Child table - the related table, often has
         several records for each record in the
         parent table


37                   Access Introduction v1.02      Factory




                 Referential Integrity


        Orphan record - a child record without a
         corresponding parent record

        Referential integrity - makes certain that
         related records are present



38                   Access Introduction v1.02      Factory
Table Links

        In this context means relate two or more
         tables on columns of data
        Permanent link –
         –   established using the Relationships command
         –   is always in effect once defined; the wizards and
             designers will take advantage of this fact
        Transient link - defined using the query-by-
         example feature of Access. Lasts for the
         duration of the query.

39                           Access Introduction v1.02    Factory




                           Creating a Permanent Link




               Drag from
               PK to FK




40                           Access Introduction v1.02    Factory
Create Permanent Links



     Link all Factory2000 tables
     Enforce referential integrity
     Normal, default joins for now




41       Access Introduction v1.02    Factory




         Permanent Links




42       Access Introduction v1.02    Factory
Enter Labor Table Data




43                                 Access Introduction v1.02                          Factory




                            Introduction to Access




                                                    End of Module

     P.O. Box 6142
     Laguna Niguel, CA 92607
     949-489-1472
     http://www.d2associates.com

44                                       Factory               Access Introduction v1.02
Introduction to Access




                Module


                Introduction to Access, External
                Data

    P.O. Box 6142
    Laguna Niguel, CA 92607
    949-489-1472
    http://www.d2associates.com

1                                          Factory                   Access Accel. Introduction v1.02




                                      Module Outline
        Three short topics:



                     Topic 1: Export tables
                     Topic 2: Import data
                     Topic 3: Link tables




2                                 Access Accel. Introduction v1.02                                 Factory
Module Hands On
    Students   “hands-on”:
      –   Export work_orders and employees tables
      –   Import work_orders text file
      –   Link employees excel file




3                    Access Accel. Introduction v1.02       Factory




    Sample Application – Factory2000

                                  Simple cost accounting
                                   application
                                  Employees work on work
                                   orders
                                  Clock labor hours for each
                                   work order



4                    Access Accel. Introduction v1.02       Factory
Recording Factory2000 Labor Hours


     EmpNo fName             lName           Rate            Wono    Descr         Hours
     12          Bob         Smith           15              A1      Casting 12
     13          Mary        Chavez          20              A1      Casting 22
     14          Alicia      Parks           25              B3      Ass’ly        15
     14          Alicia      Parks           25              C2      Screws 18



                 What problems do you see with this approach?


5                         Access Accel. Introduction v1.02                                Factory




Factory2000 Relational Database Structure

    EmpNo        fName    lName       Rate MgrNo              Wono Descr            Std
    12           Bob      Smith       15       13             A1         Casting 30

    13           Mary     Chavez      20                      B3         Fitting    50

    14           Alicia   Parks       25       12             C2         Screws 70

    employees                                                                      Work_orders
                    EmpNo      Wono        Start       End          Hours
                    12         A1          1/1/01      1/31/01      20

                    14         C2          2/1/01      2/28/01      42
         Labor
                    14         B3          1/1/01      2/28/01      40

6                         Access Accel. Introduction v1.02                                Factory
Exporting a table


       Very simple
       Click File|Export (or save as)
       Specify type: Access can
        export to many types: Excel,
        Text, etc.



7          Access Accel. Introduction v1.02    Factory




             Exporting tables


                    Export Work_Orders to CSV
                     text file.
                    Export Employees to an
                     Excel spreadsheet.
                    Note you can also export to
                     another Access table. Even
                     one elsewhere on a LAN!


8          Access Accel. Introduction v1.02    Factory
Using External Data

        Two methods:
         –    Import the data into a new (or existing table) in your
              database
         –    Link to the data. A table link appears in your
              database but the data stays in the original file.




9                       Access Accel. Introduction v1.02        Factory




                            Importing Files

              Another very important feature
              Start from new table dialog, pick
               Import Table
              It will start a wizard
              Use advanced to select fields, etc.
              Specifications can be saved for later
               use

10                      Access Accel. Introduction v1.02        Factory
Importing a Text File

       Importing a table from a Text File




11         Access Accel. Introduction v1.02        Factory




     Importing from a text file


            Import the instructor-supplied
             labor text file into the previously
             created labor table
            Save the specification




12         Access Accel. Introduction v1.02        Factory
Linking a table

        Use new table dialog
        Select Link Table
        This will set up a connection to an
         external table. It does not become
         part of the Access database
        Access can link to many types: Excel,
         ODBC connection, etc.

13              Access Accel. Introduction v1.02   Factory




                     Linking a Table

                       Linking a table




14              Access Accel. Introduction v1.02   Factory
Linking a Table

            Linking a table




15   Access Accel. Introduction v1.02   Factory




          Linking a Table

            Linking a table




16   Access Accel. Introduction v1.02   Factory
Link a table


                                                 Link the Employees
                                                  Excel
                                                 Give it a name like
                                                  Employees_xls




17                                 Access Accel. Introduction v1.02                                 Factory




                Introduction to Microsoft Access

               Module


               Introduction to Access, External
               Data

     P.O. Box 6142
     Laguna Niguel, CA 92607
     949-489-1472
     http://www.d2associates.com                            [End of Module]
18                                          Factory                   Access Accel. Introduction v1.02
Notes




             This slide intentionally left blank
19




     Notes




             This slide intentionally left blank
20
Microsoft Access



      Module:
      Queries



    P.O. Box 6142
    Laguna Niguel, CA 92607
    949-489-1472
    http://www.d2associates.com
1                                         Factory                Access - Accelerated Queries




                                  Module Hands On
       Students       “hands-on”:

                  –   Create a simple query
                  –   Create a multi-table query
                  –   Create calculated fields
                  –   Create a summary query
                  –   Concatenate fields
                  –   Create a parameter query




2                                 Access - Accelerated Queries                             Factory
Creating a Query


        Activate the Create tab of the Database
         window
        Click the Query Design button
        Interact with the dialog boxes




3                 Access - Accelerated Queries    Factory




    Query Results


       Results placed in a dynaset in a window

       Dynaset can be used like a regular table
        – Most useful when you work with fields
          from several tables
        – Any changes that are made to a dynaset
          field are also made to the original
          record

4                 Access - Accelerated Queries    Factory
Query Design Window

       QBE grid - controls which fields appear in
        the dynaset
       Parts of the grid
        –   Field - contains the name of the field
        –   Table - contains the field’s table name
        –   Sort - controls the order of displayed data
        –   Show - displays a field in the dynaset
        –   Criteria - enter a condition to display selected
            records
5                        Access - Accelerated Queries      Factory




    Criteria
       Logical Comparison Operators
        –   <, >, =, =<, >=. <>
       Special Operators
        –   LIKE
        –   IS NULL
        –   BETWEEN
        –   IN
       Special characters
        –   [ square brackets around names]
        –   (parentheses around function arguments)
        –   # pound sign around dates#

6                        Access - Accelerated Queries      Factory
Like (“Wild Card Matches”)

       ANSI standard                            Microsoft Access
       Where                                    Where
        customer_last_name like                   customer_last_name like
        “Jo%”                                     “Jo*”
       Like “Jo_”                               Like “Jo?”

         • * means match any string of characters; ? means
         match one character.
         • Access actually allow more sophisticated Unix type
         search patterns as well – see help
7                       Access - Accelerated Queries                 Factory




                 Create a Simple Query


                       Use Work_Orders table
                       Show fields: all except accum
                       Sort by WoNo
                       Only records where description
                        contains an “s”
                       Save your query as qrySimple


8                       Access - Accelerated Queries                 Factory
Simple Query (Find all records with an “S in the
     description field)
                    Query by Example (QBE) Grid




9                         Access - Accelerated Queries      Factory




                             Joining Tables


        Tables can be joined for performing a query
         –   Must have a common field
         –   Linking in QBE grid performed via a drag
             operation
         –   Join types: inner, left outer, right outer
         –   Use show tables dialog to bring up list of tables




10                        Access - Accelerated Queries      Factory
Joining two Tables
     Drag from
     PK to FK



                                                Double Click table
                                                  name to add




11               Access - Accelerated Queries                        Factory




     Create a multi-table query


                 Join Labor and Employees
                 Show following fields: all from labor,
                  fname, lname and rate from
                  employees
                 Sort by empno then wono
                 Save your query as qryLaborDetail




12               Access - Accelerated Queries                        Factory
Multi-table Query Design




13             Access - Accelerated Queries   Factory




     Multi-table Query Results




14             Access - Accelerated Queries   Factory
Calculated Fields

         Can embed calculations in a query
         Creates a new temporary field which
          appears in the dynaset
         Store your calculations there
         Can use an expression “builder” to help



15                 Access - Accelerated Queries     Factory




            Query with Calculated Field
                     (use the builder)




16                 Access - Accelerated Queries     Factory
Query with Calculated Field

                       Use qryLaborDetail
                       Add a calculated field which
                        shows the cost of a labor
                        ticket
                       Save your query as
                        qryLaborDetail_2



17              Access - Accelerated Queries       Factory




      Query with Calculated Field Results




18              Access - Accelerated Queries       Factory
Concatenated Fields


        Can “add” two character fields
         together
        Use & operator
        Example: fname & “ “ & lname




19               Access - Accelerated Queries      Factory




               Concatenated Fields

                      Create a new labordetail
                       query
                      Add a column with the
                       employee’s full name
                      This can be used later in
                       reports, etc.
                      Save your query as
                       qryLaborDetail_3

20               Access - Accelerated Queries      Factory
Concatenated Fields Results




21                     Access - Accelerated Queries       Factory




                     Summarizing Columns


        SQL aggregate functions
         –   Sum
         –   Count
         –   Avg
         –   Etc.
        Activated by clicking the Total toolbar button
        Adds a Total line to the QBE query grid
        All selected columns must be in group by or an
         aggregate


22                     Access - Accelerated Queries       Factory
Query with Aggregate




23      Access - Accelerated Queries   Factory




     Query with Aggregate


           Modify qryLaborDetail2
           Drop work order fields
           Sum the hours and cost
           Save your query as
            qryLaborGrouped



24      Access - Accelerated Queries   Factory
Query with Aggregate Results




25                  Access - Accelerated Queries               Factory




                  Parameter Queries

        Accept a variable when run



                                                   Order No
                                                   parameter




26                  Access - Accelerated Queries               Factory
Parameter Queries


              Create a parameter query
              Base on qryLaborDetail_3
              Show all fields
              Prompt for order no
              Save as qryParam


27       Access - Accelerated Queries     Factory




     Parameter Query Results




28       Access - Accelerated Queries     Factory
Accelerated Introduction to Access




                                                     End of Module

     P.O. Box 6142
     Laguna Niguel, CA 92607
     949-489-1472
     http://www.d2associates.com

29                                         Factory                Access - Accelerated Queries




           Notes




                          This slide intentionally left blank
30                                 Access - Accelerated Queries                             Factory
Notes




             This slide intentionally left blank
31                Access - Accelerated Queries     Factory




     Notes




             This slide intentionally left blank
32                Access - Accelerated Queries     Factory
Microsoft Access


          Module - Advanced Queries




    P.O. Box 6142
    Laguna Niguel, CA 92607
    949-489-1472
    http://www.dhdursoassociates.com

1                                            Factory               Access - Automating Tasks




         Module Outline
        One part:


                  Part 1: Advanced Queries




2                                      Access - Automating Tasks                          Factory
Module Hands On
    Students   “hands-on”:

          –   Create action queries
                   Maketable
                   Append
                   Delete
                   Update




3                        Access - Automating Tasks   Factory




    MS Access Training




                Part 1
                Advanced Queries


4                        Access - Automating Tasks   Factory
Advanced Queries
       Several types of special-use queries
        –   Action
                Make table*
                Append*
                Delete*
                Update
        –   Other
                Pass-through, crosstab etc.
       We will cover those with an *; others as time and
        interest permit
       Reached through Query menu bar when query
        designer is open
5                          Access - Automating Tasks        Factory




6                          Access - Automating Tasks        Factory
MakeTable Query

       Allows you to create a new table based on
        a query
       Can be output to current database or
        another one
       Very simple
        –   Design your query as you normally would
        –   Pull down the query menu and select make
            table. Assign the new table name

7                      Access - Automating Tasks          Factory




                    MakeTable Query


                      Create an extract of the
                       Employees table
                       –   Save table as Temp_Employees
                       –   Select MgrNo = 13
                       –   Save your query as
                           qryMake_Temp_Employees




8                      Access - Automating Tasks          Factory
MakeTable Query Results




9                    Access - Automating Tasks       Factory




                     Append Query

        Appends records to an existing table
        Design query then pull down query menu and
         select table to append to
        Must indicate destination field for each source
         field in query. This is done in a new QBE grid
         row.
        Can have additional “criteria” fields with no
         destination

10                   Access - Automating Tasks       Factory
11          Access - Automating Tasks   Factory




            Append Query

        Create and execute an append query
        Select from Employees all records
         with MgrNo =12
        Append to table Temp_Employees
        Save the query as
         qryAppend_Temp_Employees


12          Access - Automating Tasks   Factory
Append Query Results




13                  Access - Automating Tasks         Factory




                      Delete Query

        Deletes records from an existing table
        Go to query design window then pull
         down query menu and select table to
         delete from
        Establish the criteria in the criteria row



14                  Access - Automating Tasks         Factory
Delete Query


        Delete from temp_employees
         –   All records with rate less than 20




15           Access - Automating Tasks            Factory




     Delete Query Results




16           Access - Automating Tasks            Factory
Other Advanced Queries

              Union – “Adds” results of two queries into one result
              Update – Update records in an existing table
              SQL Pass-through – Send an SQL statement directly
               to “back-end” database (Oracle, DB2, etc.)
              Crosstab – Creates a crosstab result (similar to a
               spreadsheet)
              Etc.



17                                  Access - Automating Tasks                          Factory




                                   Microsoft Access




                                                    End of Module

     P.O. Box 6142
     Laguna Niguel, CA 92607
     949-489-1472
     http://www.d2associates.com

18                                        Factory               Access - Automating Tasks
Notes




19           Access - Automating Tasks   Factory




     Notes




20           Access - Automating Tasks   Factory
Microsoft Access



                Reports Module




    P.O. Box 6142
    Laguna Niguel, CA 92607
    949-489-1472
    http://www.d2associates.com

1                                        Factory              Access - Reports & Forms




                                  Module Hands On
         Students       “hands-on”:

                    –   Create a summary report
                    –   Format the report
                    –   Add a calculated field
                    –   Add summary fields
                    –   Add conditional formatting
                    –   Sub-reports (optional)
                            Create a sub-report
                            Create a master-detail report


2                                  Access - Reports & Forms                         Factory
Creating reports


                   Two basic methods:
                    –   Report Wizard
                    –   Report Designer


                   Common approach is to start w/
                    the Wizard then modify the result




3                         Access - Reports & Forms           Factory




    Report Wizard

       Building a Report by Using a Report Wizard
        –   Use the Report tab of the database window
        –   Can base report on table or query
        –   Report Wizard - a series of dialog boxes that steps
            you through the process of building a report




4                         Access - Reports & Forms           Factory
5                       Access - Reports & Forms          Factory




    Report Wizard

       After selecting the table or query you give
        the Wizard additional information…
        –   Grouping – for summaries, etc.
        –   Sorting – for sort order within group, plus
            which summary function to use
        –   Format and style




6                       Access - Reports & Forms          Factory
Report Wizard

                    Create a labor report
                     –   Use qryLaborDetail query
                     –   Select wono, empno, fname,
                         lname, hours
                     –   Group by wono
                     –   Use summary options: sum hours,
                     –   Layout and style to taste
                     –   Save as rptLabor

7                        Access - Reports & Forms          Factory




    Report Design Window

       Menu Bar and Toolbar Rulers - vertical and horizontal
       Report Layout
       Toolbox
       Field List Box - used for adding fields to a report
        template
       Properties Sheet or Section Detail Sheet - controls the
        appearance of a report object
       Scroll Bars


8                        Access - Reports & Forms          Factory
Report Designer




9                     Access - Reports & Forms         Factory




     Redesigning a Report

        Able to move field and title boxes around the
         design template via a drag operation
        Able to resize the report bands using selection
         handles
        Able to add additional titles using label control
        Able to align text as well as change the font
         and size of type used
        Can add background fill effects, etc.

10                    Access - Reports & Forms         Factory
Report Designer

                 Open rptLabor in design view
                  –   Format headings
                  –   Remove extra subtotal row and
                      reduce band height
                  –   Fill title with grey background
                  –   Etc.
                  –   Save with same name
                      (rptLabor)


11             Access - Reports & Forms                 Factory




     Report Designer Results




12             Access - Reports & Forms                 Factory
Report Designer

        Adding Fields
         –   Use toolbox, or
         –   Drag and drop from field list
         –   Set control source on property sheet if appropriate(see below)
         –   Put SQL function around the control source for aggregate
             fields
        Two types
         –   Bound
         –   Unbound (no control source)



13                         Access - Reports & Forms                     Factory




                             Report Designer
                                                                      Function




14                         Access - Reports & Forms                     Factory
Report Designer

                  Open the report Labor in
                   design view
                    –   Add a cost column (unbound
                        control)
                    –   Format to taste
                    –   Save report as rptLaborCost




15                 Access - Reports & Forms           Factory




     Report Designer

              One more change to Labor
               report
               –   Add group and grand totals to
                   labor cost for the report
               –   Add an unbound textbox
                   control
               –   Use a formula, =sum(…), as
                   the control source
               –   Save as rptLaborCost_2

16                 Access - Reports & Forms           Factory
Labor report with Cost Column




17                           Access - Reports & Forms              Factory




     Conditional Formatting

        Format, Conditional Formatting commands
         from Menu Bar
        Can be used for forms or reports
         –   Examines the contents of a field
         –   Based upon field’s contents able to specify:
                 Font/Font size/Font color
                 Background color
                 Text attributes (boldface, underline, italics)
        Try flagging stdhrs >= 70

18                           Access - Reports & Forms              Factory
Subreports

          Can have sub reports added to a main
           report
           –   to show detail
           –   To add related information such as customer data
               on an invoice
          First create the sub report
          Then create the main report and drag the
           sub report and drop it in place, or
          Use the subform/sub-report control


19                     Access - Reports & Forms                   Factory




20                     Access - Reports & Forms                   Factory
Sub Reports


               Create a subreport named
                srptLaborDetail_3
                –    Base on qryLaborDetail_3
                –    Be sure to use tabular format
                –    Eliminate extraneous title
                     information



21                  Access - Reports & Forms         Factory




        Labor Sub Report




22                  Access - Reports & Forms         Factory
Subreports

                       Make sure you have a permanent
                        link between work_orders and
                        qryLaborDetail_3
                       Create a main report
                        rptWork_Orders_Main
                        –   Base on work_orders table
                        –   Expand the detail band and drag the
                            subreport srptLaborDetail_3 into
                            position
                       Format to taste

23                   Access - Reports & Forms                     Factory




     Sub Reports

        Drag new subreport to main report, or use
         sub/form subreport control
        Save as rptWork_OrdersFull




24                   Access - Reports & Forms                     Factory
Full Work Orders Report Results




25                                  Access - Reports & Forms                         Factory




                                   Microsoft Access


                Reports Module




     P.O. Box 6142
     Laguna Niguel, CA 92607
     949-489-1472                                    [End of Module]
     http://www.d2associates.com
26                                        Factory              Access - Reports & Forms
Notes




27           Access - Reports & Forms   Factory




     Notes




28           Access - Reports & Forms   Factory
Introduction to Microsoft Access



                  Module -
                  Criteria Selection Forms



    P.O. Box 6142
    Laguna Niguel, CA 92607
    949-489-1472
    http://www.d2associates.com

1                                        Factory              Access - Reports & Forms




                                  Module Hands On
         Students       “hands-on”:

              –   Create an unbound form




2                                  Access - Reports & Forms                         Factory
Forms

       Form - provides for customized data entry
        instead of using the datasheet window
       Also used to establish criteria for reports and
        queries
       Found on the Forms tab of the database
        window
       Form Wizards - a series of dialog boxes
        prompting you about your form requirements

3                    Access - Reports & Forms         Factory




    Form Designer

       Design surface for forms
       Add controls from toolbox
       Some controls themselves have wizards which
        can invoke certain actions (run query, open
        report, etc)




4                    Access - Reports & Forms         Factory
5                 Access - Reports & Forms                  Factory




    Form Designer

            Build a criteria selection form for the
             parameter query qryParam (use design
             view)
             –   Add an unbound control named txtOrderNo
             –   Make sure the control wizard button is depressed
             –   Add a button which will run the param query
             –   Run the form. What happened? Why?
             –   Save as frmParam




6                 Access - Reports & Forms                  Factory
Fix the query and form then rerun




    Change the variable names to look at the form
7                Access - Reports & Forms           Factory




      Criteria Selection Form Results




8                Access - Reports & Forms           Factory
Subforms

            Same idea as sub reports
            Main form uses parent table; sub form uses
             child table
            Several ways to create them
              –   Create sub form first, drag and drop to main form
              –   Use subform/subreport control
              –   Create with form wizard directly


9                                  Access - Reports & Forms                         Factory




               Introduction to Microsoft Access


                  Module -
                  Criteria Selection Forms



     P.O. Box 6142
     Laguna Niguel, CA 92607
     949-489-1472                                   [End of Module]
     http://www.d2associates.com
10                                       Factory              Access - Reports & Forms
Notes




             This slide intentionally left blank
11                 Access - Reports & Forms        Factory




     Notes




             This slide intentionally left blank
12                 Access - Reports & Forms        Factory
Orange Coast Database Associates Course Material                               (800)355-9855 or http://www.dhdursoassociates.com



                           Accelerated Computer Training




                  Orange Coast
                Database Associates




                                  Specializing in Microsoft Office,
                                Access, SQL, and related technologies
                                Computer Training, Programming & Consulting
                                                   32422 Alipaz St., Suite A-15
                                                     San Juan Capistrano, CA
                             (800)355-9855 (Toll Free) | (949)489-1472 (Direct) | (949)485-6284 (Fax)
                                  http://www.dhdursoassociates.com | sales@dhdursoassociates.com




Accelerated Computer Training for Working Professionals

Weitere ähnliche Inhalte

Andere mochten auch

Plsql quick guide
Plsql quick guidePlsql quick guide
Plsql quick guide1bi08me024
 
Oracle database 12c 2 day + performance tuning guide
Oracle database 12c 2 day + performance tuning guideOracle database 12c 2 day + performance tuning guide
Oracle database 12c 2 day + performance tuning guidebupbechanhgmail
 
pl/sql online Training|sql online Training | iTeknowledge
pl/sql online Training|sql online Training | iTeknowledgepl/sql online Training|sql online Training | iTeknowledge
pl/sql online Training|sql online Training | iTeknowledgeMasood Khan
 
PL/SQL Code for Sample Projects
PL/SQL Code for Sample ProjectsPL/SQL Code for Sample Projects
PL/SQL Code for Sample Projectsjwjablonski
 
Advanced Database Lecture Notes
Advanced Database Lecture NotesAdvanced Database Lecture Notes
Advanced Database Lecture NotesJasour Obeidat
 
Producing the Investigative Report
Producing the Investigative ReportProducing the Investigative Report
Producing the Investigative ReportRyan Thornburg
 
SQL302 Intermediate SQL Workshop 2
SQL302 Intermediate SQL Workshop 2SQL302 Intermediate SQL Workshop 2
SQL302 Intermediate SQL Workshop 2Dan D'Urso
 
SQL302 Intermediate SQL Workshop 1
SQL302 Intermediate SQL Workshop 1SQL302 Intermediate SQL Workshop 1
SQL302 Intermediate SQL Workshop 1Dan D'Urso
 
Ikregeer Overheid20
Ikregeer   Overheid20Ikregeer   Overheid20
Ikregeer Overheid20BZK
 
AIA101.0.Aia101
AIA101.0.Aia101AIA101.0.Aia101
AIA101.0.Aia101Dan D'Urso
 
The Gap Between Online Journalism Education and Practice
The Gap Between Online Journalism Education and PracticeThe Gap Between Online Journalism Education and Practice
The Gap Between Online Journalism Education and PracticeRyan Thornburg
 
SQL201W MySQL SQL Manual
SQL201W MySQL SQL ManualSQL201W MySQL SQL Manual
SQL201W MySQL SQL ManualDan D'Urso
 
Teknologi dalam pendidikan
Teknologi dalam pendidikanTeknologi dalam pendidikan
Teknologi dalam pendidikanRudy Jemain Rj
 
Displays
DisplaysDisplays
Displaysspecfab
 
SQL200.1 Module 1
SQL200.1 Module 1SQL200.1 Module 1
SQL200.1 Module 1Dan D'Urso
 
George Washington Teacher’s Institute
George Washington Teacher’s InstituteGeorge Washington Teacher’s Institute
George Washington Teacher’s Institutemoorebl
 

Andere mochten auch (20)

Plsql quick guide
Plsql quick guidePlsql quick guide
Plsql quick guide
 
Exercise 6
Exercise 6Exercise 6
Exercise 6
 
Pl sql guide
Pl sql guidePl sql guide
Pl sql guide
 
Oracle database 12c 2 day + performance tuning guide
Oracle database 12c 2 day + performance tuning guideOracle database 12c 2 day + performance tuning guide
Oracle database 12c 2 day + performance tuning guide
 
pl/sql online Training|sql online Training | iTeknowledge
pl/sql online Training|sql online Training | iTeknowledgepl/sql online Training|sql online Training | iTeknowledge
pl/sql online Training|sql online Training | iTeknowledge
 
Adbms lab manual
Adbms lab manualAdbms lab manual
Adbms lab manual
 
PL/SQL Code for Sample Projects
PL/SQL Code for Sample ProjectsPL/SQL Code for Sample Projects
PL/SQL Code for Sample Projects
 
Advanced Database Lecture Notes
Advanced Database Lecture NotesAdvanced Database Lecture Notes
Advanced Database Lecture Notes
 
Producing the Investigative Report
Producing the Investigative ReportProducing the Investigative Report
Producing the Investigative Report
 
SQL302 Intermediate SQL Workshop 2
SQL302 Intermediate SQL Workshop 2SQL302 Intermediate SQL Workshop 2
SQL302 Intermediate SQL Workshop 2
 
SQL302 Intermediate SQL Workshop 1
SQL302 Intermediate SQL Workshop 1SQL302 Intermediate SQL Workshop 1
SQL302 Intermediate SQL Workshop 1
 
Ikregeer Overheid20
Ikregeer   Overheid20Ikregeer   Overheid20
Ikregeer Overheid20
 
AIA101.0.Aia101
AIA101.0.Aia101AIA101.0.Aia101
AIA101.0.Aia101
 
The Gap Between Online Journalism Education and Practice
The Gap Between Online Journalism Education and PracticeThe Gap Between Online Journalism Education and Practice
The Gap Between Online Journalism Education and Practice
 
SQL201W MySQL SQL Manual
SQL201W MySQL SQL ManualSQL201W MySQL SQL Manual
SQL201W MySQL SQL Manual
 
London
LondonLondon
London
 
Teknologi dalam pendidikan
Teknologi dalam pendidikanTeknologi dalam pendidikan
Teknologi dalam pendidikan
 
Displays
DisplaysDisplays
Displays
 
SQL200.1 Module 1
SQL200.1 Module 1SQL200.1 Module 1
SQL200.1 Module 1
 
George Washington Teacher’s Institute
George Washington Teacher’s InstituteGeorge Washington Teacher’s Institute
George Washington Teacher’s Institute
 

Ähnlich wie AIN106 Access Reporting and Analysis

AIN100A Microsoft Access Level 1
AIN100A Microsoft Access Level 1AIN100A Microsoft Access Level 1
AIN100A Microsoft Access Level 1Dan D'Urso
 
AIA101.1.MS Access Tables & Data
AIA101.1.MS Access Tables & DataAIA101.1.MS Access Tables & Data
AIA101.1.MS Access Tables & DataDan D'Urso
 
ABAP EXP RESUME MALAYSIA 20072016
ABAP EXP RESUME MALAYSIA 20072016ABAP EXP RESUME MALAYSIA 20072016
ABAP EXP RESUME MALAYSIA 20072016PON KARTHIKEYAN B
 
Elite SAS Training
Elite SAS TrainingElite SAS Training
Elite SAS Trainingdonfenner
 
SAP BI/DW Training with BO Integration
SAP BI/DW Training with BO IntegrationSAP BI/DW Training with BO Integration
SAP BI/DW Training with BO Integrationmishra4927
 
Informatica online training
Informatica online trainingInformatica online training
Informatica online trainingDivya Shree
 
AIN102.1 Microsoft Access Queries Module 1
AIN102.1 Microsoft Access Queries Module 1AIN102.1 Microsoft Access Queries Module 1
AIN102.1 Microsoft Access Queries Module 1Dan D'Urso
 
MIITE India-Career Options with IT & Soft skill certification for Freshers, P...
MIITE India-Career Options with IT & Soft skill certification for Freshers, P...MIITE India-Career Options with IT & Soft skill certification for Freshers, P...
MIITE India-Career Options with IT & Soft skill certification for Freshers, P...Prof. Harsha Kestur
 
What's New for Report Authors in Cognos 10.2
What's New for Report Authors in Cognos 10.2What's New for Report Authors in Cognos 10.2
What's New for Report Authors in Cognos 10.2Senturus
 
Sage MAS Intelligence vs. Biz Insights
Sage MAS Intelligence vs. Biz InsightsSage MAS Intelligence vs. Biz Insights
Sage MAS Intelligence vs. Biz InsightsJeffrey Paulette
 
What's New in NovaView 6.2
What's New in NovaView 6.2What's New in NovaView 6.2
What's New in NovaView 6.2www.panorama.com
 

Ähnlich wie AIN106 Access Reporting and Analysis (20)

AIN100A Microsoft Access Level 1
AIN100A Microsoft Access Level 1AIN100A Microsoft Access Level 1
AIN100A Microsoft Access Level 1
 
AIA101.1.MS Access Tables & Data
AIA101.1.MS Access Tables & DataAIA101.1.MS Access Tables & Data
AIA101.1.MS Access Tables & Data
 
ABAP EXP RESUME MALAYSIA 20072016
ABAP EXP RESUME MALAYSIA 20072016ABAP EXP RESUME MALAYSIA 20072016
ABAP EXP RESUME MALAYSIA 20072016
 
Elite SAS Training
Elite SAS TrainingElite SAS Training
Elite SAS Training
 
SAP BI/DW Training with BO Integration
SAP BI/DW Training with BO IntegrationSAP BI/DW Training with BO Integration
SAP BI/DW Training with BO Integration
 
Gic2011 aula3-ingles
Gic2011 aula3-inglesGic2011 aula3-ingles
Gic2011 aula3-ingles
 
Gic2011 aula3-ingles
Gic2011 aula3-inglesGic2011 aula3-ingles
Gic2011 aula3-ingles
 
Informatica online training
Informatica online trainingInformatica online training
Informatica online training
 
DISCUS for FAI
DISCUS for FAIDISCUS for FAI
DISCUS for FAI
 
Ansys tutorial
Ansys tutorialAnsys tutorial
Ansys tutorial
 
AIN102.1 Microsoft Access Queries Module 1
AIN102.1 Microsoft Access Queries Module 1AIN102.1 Microsoft Access Queries Module 1
AIN102.1 Microsoft Access Queries Module 1
 
SAP Real Time Training for Functional Consultant
SAP Real Time Training for Functional ConsultantSAP Real Time Training for Functional Consultant
SAP Real Time Training for Functional Consultant
 
MIITE India-Career Options with IT & Soft skill certification for Freshers, P...
MIITE India-Career Options with IT & Soft skill certification for Freshers, P...MIITE India-Career Options with IT & Soft skill certification for Freshers, P...
MIITE India-Career Options with IT & Soft skill certification for Freshers, P...
 
What's New for Report Authors in Cognos 10.2
What's New for Report Authors in Cognos 10.2What's New for Report Authors in Cognos 10.2
What's New for Report Authors in Cognos 10.2
 
Sage MAS Intelligence vs. Biz Insights
Sage MAS Intelligence vs. Biz InsightsSage MAS Intelligence vs. Biz Insights
Sage MAS Intelligence vs. Biz Insights
 
KarenResumeDBA
KarenResumeDBAKarenResumeDBA
KarenResumeDBA
 
KarenResumeDBA
KarenResumeDBAKarenResumeDBA
KarenResumeDBA
 
Sunstate
SunstateSunstate
Sunstate
 
What's New in NovaView 6.2
What's New in NovaView 6.2What's New in NovaView 6.2
What's New in NovaView 6.2
 
Tarun_Medimi
Tarun_MedimiTarun_Medimi
Tarun_Medimi
 

Mehr von Dan D'Urso

SQL201S Accelerated Introduction to MySQL Queries
SQL201S Accelerated Introduction to MySQL QueriesSQL201S Accelerated Introduction to MySQL Queries
SQL201S Accelerated Introduction to MySQL QueriesDan D'Urso
 
LCD201d Database Diagramming with Lucidchart
LCD201d Database Diagramming with LucidchartLCD201d Database Diagramming with Lucidchart
LCD201d Database Diagramming with LucidchartDan D'Urso
 
Database Normalization
Database NormalizationDatabase Normalization
Database NormalizationDan D'Urso
 
VIS201d Visio Database Diagramming
VIS201d Visio Database DiagrammingVIS201d Visio Database Diagramming
VIS201d Visio Database DiagrammingDan D'Urso
 
PRJ101a Project 2013 Accelerated
PRJ101a Project 2013 AcceleratedPRJ101a Project 2013 Accelerated
PRJ101a Project 2013 AcceleratedDan D'Urso
 
PRJ101xl Project Libre Basic Training
PRJ101xl Project Libre Basic TrainingPRJ101xl Project Libre Basic Training
PRJ101xl Project Libre Basic TrainingDan D'Urso
 
Introduction to coding using Python
Introduction to coding using PythonIntroduction to coding using Python
Introduction to coding using PythonDan D'Urso
 
Stem conference
Stem conferenceStem conference
Stem conferenceDan D'Urso
 
Microsoft access self joins
Microsoft access self joinsMicrosoft access self joins
Microsoft access self joinsDan D'Urso
 
SQL302 Intermediate SQL Workshop 3
SQL302 Intermediate SQL Workshop 3SQL302 Intermediate SQL Workshop 3
SQL302 Intermediate SQL Workshop 3Dan D'Urso
 
Course Catalog
Course CatalogCourse Catalog
Course CatalogDan D'Urso
 
SQL212 Oracle SQL Manual
SQL212 Oracle SQL ManualSQL212 Oracle SQL Manual
SQL212 Oracle SQL ManualDan D'Urso
 
SQL206 SQL Median
SQL206 SQL MedianSQL206 SQL Median
SQL206 SQL MedianDan D'Urso
 
SQL202.3 Accelerated Introduction to SQL Using SQL Server Module 3
SQL202.3 Accelerated Introduction to SQL Using SQL Server Module 3SQL202.3 Accelerated Introduction to SQL Using SQL Server Module 3
SQL202.3 Accelerated Introduction to SQL Using SQL Server Module 3Dan D'Urso
 
SQL202.2 Accelerated Introduction to SQL Using SQL Server Module 2
SQL202.2 Accelerated Introduction to SQL Using SQL Server Module 2SQL202.2 Accelerated Introduction to SQL Using SQL Server Module 2
SQL202.2 Accelerated Introduction to SQL Using SQL Server Module 2Dan D'Urso
 
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1Dan D'Urso
 
AIN102S Access string function sample queries
AIN102S Access string function sample queriesAIN102S Access string function sample queries
AIN102S Access string function sample queriesDan D'Urso
 
AIN102.2 Microsoft Access Queries
AIN102.2 Microsoft Access QueriesAIN102.2 Microsoft Access Queries
AIN102.2 Microsoft Access QueriesDan D'Urso
 
AMP110 Microsoft Access Macros
AMP110 Microsoft Access MacrosAMP110 Microsoft Access Macros
AMP110 Microsoft Access MacrosDan D'Urso
 
Course Catalog
Course CatalogCourse Catalog
Course CatalogDan D'Urso
 

Mehr von Dan D'Urso (20)

SQL201S Accelerated Introduction to MySQL Queries
SQL201S Accelerated Introduction to MySQL QueriesSQL201S Accelerated Introduction to MySQL Queries
SQL201S Accelerated Introduction to MySQL Queries
 
LCD201d Database Diagramming with Lucidchart
LCD201d Database Diagramming with LucidchartLCD201d Database Diagramming with Lucidchart
LCD201d Database Diagramming with Lucidchart
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
VIS201d Visio Database Diagramming
VIS201d Visio Database DiagrammingVIS201d Visio Database Diagramming
VIS201d Visio Database Diagramming
 
PRJ101a Project 2013 Accelerated
PRJ101a Project 2013 AcceleratedPRJ101a Project 2013 Accelerated
PRJ101a Project 2013 Accelerated
 
PRJ101xl Project Libre Basic Training
PRJ101xl Project Libre Basic TrainingPRJ101xl Project Libre Basic Training
PRJ101xl Project Libre Basic Training
 
Introduction to coding using Python
Introduction to coding using PythonIntroduction to coding using Python
Introduction to coding using Python
 
Stem conference
Stem conferenceStem conference
Stem conference
 
Microsoft access self joins
Microsoft access self joinsMicrosoft access self joins
Microsoft access self joins
 
SQL302 Intermediate SQL Workshop 3
SQL302 Intermediate SQL Workshop 3SQL302 Intermediate SQL Workshop 3
SQL302 Intermediate SQL Workshop 3
 
Course Catalog
Course CatalogCourse Catalog
Course Catalog
 
SQL212 Oracle SQL Manual
SQL212 Oracle SQL ManualSQL212 Oracle SQL Manual
SQL212 Oracle SQL Manual
 
SQL206 SQL Median
SQL206 SQL MedianSQL206 SQL Median
SQL206 SQL Median
 
SQL202.3 Accelerated Introduction to SQL Using SQL Server Module 3
SQL202.3 Accelerated Introduction to SQL Using SQL Server Module 3SQL202.3 Accelerated Introduction to SQL Using SQL Server Module 3
SQL202.3 Accelerated Introduction to SQL Using SQL Server Module 3
 
SQL202.2 Accelerated Introduction to SQL Using SQL Server Module 2
SQL202.2 Accelerated Introduction to SQL Using SQL Server Module 2SQL202.2 Accelerated Introduction to SQL Using SQL Server Module 2
SQL202.2 Accelerated Introduction to SQL Using SQL Server Module 2
 
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
 
AIN102S Access string function sample queries
AIN102S Access string function sample queriesAIN102S Access string function sample queries
AIN102S Access string function sample queries
 
AIN102.2 Microsoft Access Queries
AIN102.2 Microsoft Access QueriesAIN102.2 Microsoft Access Queries
AIN102.2 Microsoft Access Queries
 
AMP110 Microsoft Access Macros
AMP110 Microsoft Access MacrosAMP110 Microsoft Access Macros
AMP110 Microsoft Access Macros
 
Course Catalog
Course CatalogCourse Catalog
Course Catalog
 

AIN106 Access Reporting and Analysis

  • 1. Orange Coast Database Associates Course (800)355-9855 or http://www.dhdursoassociates.com AIN106 Introduction to Microsoft Access Reports and Analysis Orange Coast Database Associates Specializing in Microsoft Office, Access, SQL, and related technologies Classes custom designed for Working Professionals http://www.dhdursoassociates.com San Juan Capistrano, CA (800)355-9855 Accelerated Computer Training for Working Professionals Factory 2010 Case
  • 2. AIN106 - Introduction to Access Quick introduction to Access for experienced Windows users P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 http://www.dhdursoassociates.com slides.1@dhdursoassociates.com 1 Factory AIN106 AIN106 - Introduction to Access  Introduction (s)  Facilities  Course Materials (Varies by class) – Student Questionnaire – PowerPoint handouts for all sessions – Evaluation form – Training certificate – Collaterals (Maps, Catalogs, etc.) 2 AIN106 Factory
  • 3. MS Access Introductory (100 Level) Standard Curriculum AIN100 AIN100T Incl. A & B AIA101 AIN104 AIN102 AMP110 Reports Queries Macros & Forms 3 AIN106 Factory MS Access Introductory (100 Level) Specialized Curriculum AIN100 Incl. A & B AIN106 TBD Reports TBD & Analysis 4 AIN106 Factory
  • 4. AIN106 – Introduction to Access  Quick pace for experienced windows users  Assumes no prior knowledge of Access  End-user, not programmer, oriented  Somewhat structured towards personal use for analysis and reporting 5 AIN106 V1.2 Factory AIN106 - Introduction to Access Course Topics:  Databases  Tables  Datasheet  External Data  Queries  Reports  Criteria Selection Forms 6 AIN106 Factory
  • 5. Introduction to Access Industry Standard Approach: Access has many ways to accomplish tasks. As an accelerated course we will cover only the most common. Tables Table Designer Queries Query designer Reports Wizard then modify Forms Wizard then modify Macros Macro Designer 7 AIN106 Factory AIN106 - Introduction to Access Course Format:  2 Sessions  Lecture  Demo  Student “hands-on” - by the end of the class the student will have constructed a small, functional application  Exercises are cumulative – later examples build on objects created earlier 8 AIN106 Factory
  • 6. Database Design – Critical Topic  What do I want? – (Outputs - Reports)  What have I got? – (Inputs – Tables, Import data)  What do I need to do to get there? – (Processes, Queries) 9 AIN106 Factory Note: we have a full day course (DBD201) on this important topic. Understand your database  Draw a PRODUCTS picture  Write a description ORDERS  Plan your queries C.C. EMPLOYEES Toys 10 AIN106 Factory
  • 7. AIN106 - Introduction to Access Course Schedule (3 hour sessions):  Session 1 – Tables and Data – Starting Queries  Session 2 – Queries – Reports – Criteria Selection Forms 11 AIN106 Factory Notes 12 AIN106 Factory
  • 8. Microsoft Access Module Introduction to Access, Tables and Data 1 Factory Access Introduction v1.02 Module Outline Three parts:  Part 1: Introduction & Tables  Part 2: Manipulating and Sorting Tables  Part 3: Table Relationships 2 Access Introduction v1.02 Factory
  • 9. Module Hands On Students “hands-on”: – Create a database based on Factory 2000 case – Create 3 tables (w/validation rules and masks) – Populate tables – Sort & Manipulate tables – Create table relationships (permanent links) 3 Access Introduction v1.02 Factory Introduction to Access Module Part 1: Introduction to Access and Tables 4 Factory Access Introduction v1.02
  • 10. Access Modes  Menu-driven interface - Interact with a database and its objects using menu commands  Program mode - Lets you store instructions in a VBA program file  This course concentrates on the menu interface but does cover macros which can be used to “program” a series of actions 5 Access Introduction v1.02 Factory Relational Database Concepts  Most prominent type of database – Access is a Relational Database  Based on set theory (Mathematically based)  A table is a relation between columns and rows  Each row must be unique  Each column may contain only one type of data and must have a unique name  Each data element may contain only one value  Information from multiple tables can be combined using a column of common information 6 Access Introduction v1.02 Factory
  • 11. Database Terminology  Database – in Access an “.mdb” file in which tables, reports, queries, and other objects are stored  Table – stores facts about one subject (entity)  Record - contains related information about one entity “instance”  Field - contains a fact about an entity 7 Access Introduction v1.02 Factory Database Terminology (cont.)  Key - used to order, identify, and retrieve records in the database  Primary key - unique identifier for a particular record. Only one per table.  Index – Internal structure that speeds up searches and joins. Also used to enforce uniqueness. Can have several per table.  Table structure - the arrangement of information within a record, the type of characters, field length, limitations, etc. 8 Access Introduction v1.02 Factory
  • 12. Database Terminology (cont.)  Form - paper-like method of accessing and entering data in a table  Query – retrieves information from Access tables  Report - provides the ability to arrange table data as well as to perform calculations and then print a paper-based report  Object – used in database world as generic term for queries, reports, indexes, tables, etc. Not the same as programming object. 9 Access Introduction v1.02 Factory Sample Case – Factory2000  Implement a simple cost accounting application  Employees work on work orders – Clock labor hours worked for each work order – Only one labor ticket per employee per work order – Each work order has a standard time budget  Some data periodically imported and/or exported 10 Access Introduction v1.02 Factory
  • 13. Existing Method of Recording Factory2000 Labor Hours EmpNo fName lName Rate Wono Descr Hours 12 Bob Smith 15 A1 Casting 12 13 Mary Chavez 20 A1 Casting 22 14 Alicia Parks 25 B3 Ass’ly 15 14 Alicia Parks 25 C2 Screws 18 This what is called a “flat file”. What problems do you see with this approach? 11 Access Introduction v1.02 Factory Factory2000 Relational Database Structure EmpNo fName lName Rate Wono Descr Std 12 Bob Smith 15 A1 Casting 30 13 Mary Chavez 20 B3 Fitting 50 14 Alicia Parks 25 C2 Screws 70 employees Work_orders EmpNo Wono Start End Hours 12 A1 1/1/01 1/31/01 20 14 C2 2/1/01 2/28/01 42 Labor 14 B3 1/1/01 2/28/01 40 12 Access Introduction v1.02 Factory
  • 14. Creating a Database  Ways to create a database – Create a database using an Access template or Wizard – (not always recommended) – Create a blank database and then insert your own objects – we will use this method in this course 13 Access Introduction v1.02 Factory Creating a Table  Click new from tables tab  Naming a Table – Up to 64 “standard” characters can be used – Do not use an extension – No leading spaces or control characters, in fact try to avoid spaces altogether  Add fields one by one  Set Field Properties in Field Properties box 14 Access Introduction v1.02 Factory
  • 15. Designing Fields  Field Type – text, datetime, number, etc.  Field Width – 10 characters, etc.  Caption – “Column title” for display  Format – Determines how the field is displayed (long date, short date, etc.)  Click toolbar key symbol to make primary key  Set indexed for secondary keys, required, etc. 15 Access Introduction v1.02 Factory Table Designer 16 Access Introduction v1.02 Factory
  • 16. Hands On - Create Table Structures  Employees  Work_Orders  Labor 17 Access Introduction v1.02 Factory Employees Table Definition (Instructor led)  EmpNo text(2), primary key  Fname text(10)  Lname text (15), required  Rate currency, required  MgrNo text(2) Add captions, too 18 Access Introduction v1.02 Factory
  • 17. Work_Orders Table Definition (On Your Own)  WoNo text(2), primary key  Descr text(15)  StdHrs number(single,2), required  Accum number(single,2), required Add captions, too 19 Access Introduction v1.02 Factory Labor Table Definition (On Your Own)  EmpNo text(2), primary key  WoNo text(2), primary key  Start datetime, required  End datetime  Hours number(single,2) Add captions, too 20 Access Introduction v1.02 Factory
  • 18. Field Validation & Masks  Add some validations – Require start date – End >= start date – Etc.  Add some input masks & formats 21 Access Introduction v1.02 Factory Datasheets  Datasheet window - displays the contents of a table in a spreadsheet-like format – Each row contains a record – Each column contains a field  Speedbar - appears at the bottom of the window and is used to navigate through the records in a table 22 Access Introduction v1.02 Factory
  • 19. Datasheet View 23 Access Introduction v1.02 Factory Entering & Editing Records  Enter table data from the handouts 24 Access Introduction v1.02 Factory
  • 20. Employees Table Data 25 Access Introduction v1.02 Factory Work_Orders Table Data 26 Access Introduction v1.02 Factory
  • 21. Labor Table Data To be added later 27 Access Introduction v1.02 Factory Introduction to Access Module Part 2: Manipulating and Sorting Tables 28 Factory Access Introduction v1.02
  • 22. Printing a Table  Access allows you to create “quick and dirty” reports by clicking the toolbar Print button – A row/column presentation is used – Field names appear along the top – Records are rows – Fields are columns – A grid is printed around each field 29 Access Introduction v1.02 Factory Quick Reports  Report Wizard – Module 2 covers reports – For now, be aware a quick report can be produced using the report wizard 30 Access Introduction v1.02 Factory
  • 23. Manipulating the Datasheet  Gridlines – controlled by Cells Effects dialog box  Can control background color, fonts, etc.  Fields can be resized and moved  Also, hidden and locked like a spreadsheet 31 Access Introduction v1.02 Factory Record Pointer  Record pointer (thick black arrow head) helps you keep track of where you are in a table  The character is used in the left-hand table cells to indicate the pointer location  The pointer moves by using keyboard, scrollbar, or speedbar commands  => Changes are saved when you move to next record 32 Access Introduction v1.02 Factory
  • 24. Find Command  Use the Edit | Find command sequence or click the Find toolbar button  Either command activates the Find in field dialog box  Searches can have “Wildcards” (in fact sophisticated Unix style searches are available) 33 Access Introduction v1.02 Factory One Field Sort  Select the column to be used in the sort  Click the desired Sort Ascending or Descending toolbar button 34 Access Introduction v1.02 Factory
  • 25. Multiple Field Sort  Filter - used to sort data or restrict records shown  Use Records | Filter | Advanced Filter/Sort command sequence  Activates the filter window  Specify the fields and sort order  Execute by clicking the Apply Filter/Sort button of the toolbar 35 Access Introduction v1.02 Factory Introduction to Access Module Part 3: Table Relationships 36 Factory Access Introduction v1.02
  • 26. Relating Tables  Command sequence – Tools | Relationships  Parent table - table used as the main table for a relationship  Child table - the related table, often has several records for each record in the parent table 37 Access Introduction v1.02 Factory Referential Integrity  Orphan record - a child record without a corresponding parent record  Referential integrity - makes certain that related records are present 38 Access Introduction v1.02 Factory
  • 27. Table Links  In this context means relate two or more tables on columns of data  Permanent link – – established using the Relationships command – is always in effect once defined; the wizards and designers will take advantage of this fact  Transient link - defined using the query-by- example feature of Access. Lasts for the duration of the query. 39 Access Introduction v1.02 Factory Creating a Permanent Link Drag from PK to FK 40 Access Introduction v1.02 Factory
  • 28. Create Permanent Links Link all Factory2000 tables Enforce referential integrity Normal, default joins for now 41 Access Introduction v1.02 Factory Permanent Links 42 Access Introduction v1.02 Factory
  • 29. Enter Labor Table Data 43 Access Introduction v1.02 Factory Introduction to Access End of Module P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 http://www.d2associates.com 44 Factory Access Introduction v1.02
  • 30. Introduction to Access Module Introduction to Access, External Data P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 http://www.d2associates.com 1 Factory Access Accel. Introduction v1.02 Module Outline Three short topics:  Topic 1: Export tables  Topic 2: Import data  Topic 3: Link tables 2 Access Accel. Introduction v1.02 Factory
  • 31. Module Hands On Students “hands-on”: – Export work_orders and employees tables – Import work_orders text file – Link employees excel file 3 Access Accel. Introduction v1.02 Factory Sample Application – Factory2000  Simple cost accounting application  Employees work on work orders  Clock labor hours for each work order 4 Access Accel. Introduction v1.02 Factory
  • 32. Recording Factory2000 Labor Hours EmpNo fName lName Rate Wono Descr Hours 12 Bob Smith 15 A1 Casting 12 13 Mary Chavez 20 A1 Casting 22 14 Alicia Parks 25 B3 Ass’ly 15 14 Alicia Parks 25 C2 Screws 18 What problems do you see with this approach? 5 Access Accel. Introduction v1.02 Factory Factory2000 Relational Database Structure EmpNo fName lName Rate MgrNo Wono Descr Std 12 Bob Smith 15 13 A1 Casting 30 13 Mary Chavez 20 B3 Fitting 50 14 Alicia Parks 25 12 C2 Screws 70 employees Work_orders EmpNo Wono Start End Hours 12 A1 1/1/01 1/31/01 20 14 C2 2/1/01 2/28/01 42 Labor 14 B3 1/1/01 2/28/01 40 6 Access Accel. Introduction v1.02 Factory
  • 33. Exporting a table  Very simple  Click File|Export (or save as)  Specify type: Access can export to many types: Excel, Text, etc. 7 Access Accel. Introduction v1.02 Factory Exporting tables  Export Work_Orders to CSV text file.  Export Employees to an Excel spreadsheet.  Note you can also export to another Access table. Even one elsewhere on a LAN! 8 Access Accel. Introduction v1.02 Factory
  • 34. Using External Data  Two methods: – Import the data into a new (or existing table) in your database – Link to the data. A table link appears in your database but the data stays in the original file. 9 Access Accel. Introduction v1.02 Factory Importing Files  Another very important feature  Start from new table dialog, pick Import Table  It will start a wizard  Use advanced to select fields, etc.  Specifications can be saved for later use 10 Access Accel. Introduction v1.02 Factory
  • 35. Importing a Text File Importing a table from a Text File 11 Access Accel. Introduction v1.02 Factory Importing from a text file  Import the instructor-supplied labor text file into the previously created labor table  Save the specification 12 Access Accel. Introduction v1.02 Factory
  • 36. Linking a table  Use new table dialog  Select Link Table  This will set up a connection to an external table. It does not become part of the Access database  Access can link to many types: Excel, ODBC connection, etc. 13 Access Accel. Introduction v1.02 Factory Linking a Table Linking a table 14 Access Accel. Introduction v1.02 Factory
  • 37. Linking a Table Linking a table 15 Access Accel. Introduction v1.02 Factory Linking a Table Linking a table 16 Access Accel. Introduction v1.02 Factory
  • 38. Link a table  Link the Employees Excel  Give it a name like Employees_xls 17 Access Accel. Introduction v1.02 Factory Introduction to Microsoft Access Module Introduction to Access, External Data P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 http://www.d2associates.com [End of Module] 18 Factory Access Accel. Introduction v1.02
  • 39. Notes This slide intentionally left blank 19 Notes This slide intentionally left blank 20
  • 40. Microsoft Access Module: Queries P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 http://www.d2associates.com 1 Factory Access - Accelerated Queries Module Hands On Students “hands-on”: – Create a simple query – Create a multi-table query – Create calculated fields – Create a summary query – Concatenate fields – Create a parameter query 2 Access - Accelerated Queries Factory
  • 41. Creating a Query  Activate the Create tab of the Database window  Click the Query Design button  Interact with the dialog boxes 3 Access - Accelerated Queries Factory Query Results  Results placed in a dynaset in a window  Dynaset can be used like a regular table – Most useful when you work with fields from several tables – Any changes that are made to a dynaset field are also made to the original record 4 Access - Accelerated Queries Factory
  • 42. Query Design Window  QBE grid - controls which fields appear in the dynaset  Parts of the grid – Field - contains the name of the field – Table - contains the field’s table name – Sort - controls the order of displayed data – Show - displays a field in the dynaset – Criteria - enter a condition to display selected records 5 Access - Accelerated Queries Factory Criteria  Logical Comparison Operators – <, >, =, =<, >=. <>  Special Operators – LIKE – IS NULL – BETWEEN – IN  Special characters – [ square brackets around names] – (parentheses around function arguments) – # pound sign around dates# 6 Access - Accelerated Queries Factory
  • 43. Like (“Wild Card Matches”)  ANSI standard  Microsoft Access  Where  Where customer_last_name like customer_last_name like “Jo%” “Jo*”  Like “Jo_”  Like “Jo?” • * means match any string of characters; ? means match one character. • Access actually allow more sophisticated Unix type search patterns as well – see help 7 Access - Accelerated Queries Factory Create a Simple Query  Use Work_Orders table  Show fields: all except accum  Sort by WoNo  Only records where description contains an “s”  Save your query as qrySimple 8 Access - Accelerated Queries Factory
  • 44. Simple Query (Find all records with an “S in the description field) Query by Example (QBE) Grid 9 Access - Accelerated Queries Factory Joining Tables  Tables can be joined for performing a query – Must have a common field – Linking in QBE grid performed via a drag operation – Join types: inner, left outer, right outer – Use show tables dialog to bring up list of tables 10 Access - Accelerated Queries Factory
  • 45. Joining two Tables Drag from PK to FK Double Click table name to add 11 Access - Accelerated Queries Factory Create a multi-table query  Join Labor and Employees  Show following fields: all from labor, fname, lname and rate from employees  Sort by empno then wono  Save your query as qryLaborDetail 12 Access - Accelerated Queries Factory
  • 46. Multi-table Query Design 13 Access - Accelerated Queries Factory Multi-table Query Results 14 Access - Accelerated Queries Factory
  • 47. Calculated Fields  Can embed calculations in a query  Creates a new temporary field which appears in the dynaset  Store your calculations there  Can use an expression “builder” to help 15 Access - Accelerated Queries Factory Query with Calculated Field (use the builder) 16 Access - Accelerated Queries Factory
  • 48. Query with Calculated Field  Use qryLaborDetail  Add a calculated field which shows the cost of a labor ticket  Save your query as qryLaborDetail_2 17 Access - Accelerated Queries Factory Query with Calculated Field Results 18 Access - Accelerated Queries Factory
  • 49. Concatenated Fields  Can “add” two character fields together  Use & operator  Example: fname & “ “ & lname 19 Access - Accelerated Queries Factory Concatenated Fields  Create a new labordetail query  Add a column with the employee’s full name  This can be used later in reports, etc.  Save your query as qryLaborDetail_3 20 Access - Accelerated Queries Factory
  • 50. Concatenated Fields Results 21 Access - Accelerated Queries Factory Summarizing Columns  SQL aggregate functions – Sum – Count – Avg – Etc.  Activated by clicking the Total toolbar button  Adds a Total line to the QBE query grid  All selected columns must be in group by or an aggregate 22 Access - Accelerated Queries Factory
  • 51. Query with Aggregate 23 Access - Accelerated Queries Factory Query with Aggregate  Modify qryLaborDetail2  Drop work order fields  Sum the hours and cost  Save your query as qryLaborGrouped 24 Access - Accelerated Queries Factory
  • 52. Query with Aggregate Results 25 Access - Accelerated Queries Factory Parameter Queries  Accept a variable when run Order No parameter 26 Access - Accelerated Queries Factory
  • 53. Parameter Queries  Create a parameter query  Base on qryLaborDetail_3  Show all fields  Prompt for order no  Save as qryParam 27 Access - Accelerated Queries Factory Parameter Query Results 28 Access - Accelerated Queries Factory
  • 54. Accelerated Introduction to Access End of Module P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 http://www.d2associates.com 29 Factory Access - Accelerated Queries Notes This slide intentionally left blank 30 Access - Accelerated Queries Factory
  • 55. Notes This slide intentionally left blank 31 Access - Accelerated Queries Factory Notes This slide intentionally left blank 32 Access - Accelerated Queries Factory
  • 56. Microsoft Access Module - Advanced Queries P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 http://www.dhdursoassociates.com 1 Factory Access - Automating Tasks Module Outline One part:  Part 1: Advanced Queries 2 Access - Automating Tasks Factory
  • 57. Module Hands On Students “hands-on”: – Create action queries  Maketable  Append  Delete  Update 3 Access - Automating Tasks Factory MS Access Training Part 1 Advanced Queries 4 Access - Automating Tasks Factory
  • 58. Advanced Queries  Several types of special-use queries – Action  Make table*  Append*  Delete*  Update – Other  Pass-through, crosstab etc.  We will cover those with an *; others as time and interest permit  Reached through Query menu bar when query designer is open 5 Access - Automating Tasks Factory 6 Access - Automating Tasks Factory
  • 59. MakeTable Query  Allows you to create a new table based on a query  Can be output to current database or another one  Very simple – Design your query as you normally would – Pull down the query menu and select make table. Assign the new table name 7 Access - Automating Tasks Factory MakeTable Query  Create an extract of the Employees table – Save table as Temp_Employees – Select MgrNo = 13 – Save your query as qryMake_Temp_Employees 8 Access - Automating Tasks Factory
  • 60. MakeTable Query Results 9 Access - Automating Tasks Factory Append Query  Appends records to an existing table  Design query then pull down query menu and select table to append to  Must indicate destination field for each source field in query. This is done in a new QBE grid row.  Can have additional “criteria” fields with no destination 10 Access - Automating Tasks Factory
  • 61. 11 Access - Automating Tasks Factory Append Query  Create and execute an append query  Select from Employees all records with MgrNo =12  Append to table Temp_Employees  Save the query as qryAppend_Temp_Employees 12 Access - Automating Tasks Factory
  • 62. Append Query Results 13 Access - Automating Tasks Factory Delete Query  Deletes records from an existing table  Go to query design window then pull down query menu and select table to delete from  Establish the criteria in the criteria row 14 Access - Automating Tasks Factory
  • 63. Delete Query  Delete from temp_employees – All records with rate less than 20 15 Access - Automating Tasks Factory Delete Query Results 16 Access - Automating Tasks Factory
  • 64. Other Advanced Queries  Union – “Adds” results of two queries into one result  Update – Update records in an existing table  SQL Pass-through – Send an SQL statement directly to “back-end” database (Oracle, DB2, etc.)  Crosstab – Creates a crosstab result (similar to a spreadsheet)  Etc. 17 Access - Automating Tasks Factory Microsoft Access End of Module P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 http://www.d2associates.com 18 Factory Access - Automating Tasks
  • 65. Notes 19 Access - Automating Tasks Factory Notes 20 Access - Automating Tasks Factory
  • 66. Microsoft Access Reports Module P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 http://www.d2associates.com 1 Factory Access - Reports & Forms Module Hands On Students “hands-on”: – Create a summary report – Format the report – Add a calculated field – Add summary fields – Add conditional formatting – Sub-reports (optional)  Create a sub-report  Create a master-detail report 2 Access - Reports & Forms Factory
  • 67. Creating reports  Two basic methods: – Report Wizard – Report Designer  Common approach is to start w/ the Wizard then modify the result 3 Access - Reports & Forms Factory Report Wizard  Building a Report by Using a Report Wizard – Use the Report tab of the database window – Can base report on table or query – Report Wizard - a series of dialog boxes that steps you through the process of building a report 4 Access - Reports & Forms Factory
  • 68. 5 Access - Reports & Forms Factory Report Wizard  After selecting the table or query you give the Wizard additional information… – Grouping – for summaries, etc. – Sorting – for sort order within group, plus which summary function to use – Format and style 6 Access - Reports & Forms Factory
  • 69. Report Wizard  Create a labor report – Use qryLaborDetail query – Select wono, empno, fname, lname, hours – Group by wono – Use summary options: sum hours, – Layout and style to taste – Save as rptLabor 7 Access - Reports & Forms Factory Report Design Window  Menu Bar and Toolbar Rulers - vertical and horizontal  Report Layout  Toolbox  Field List Box - used for adding fields to a report template  Properties Sheet or Section Detail Sheet - controls the appearance of a report object  Scroll Bars 8 Access - Reports & Forms Factory
  • 70. Report Designer 9 Access - Reports & Forms Factory Redesigning a Report  Able to move field and title boxes around the design template via a drag operation  Able to resize the report bands using selection handles  Able to add additional titles using label control  Able to align text as well as change the font and size of type used  Can add background fill effects, etc. 10 Access - Reports & Forms Factory
  • 71. Report Designer  Open rptLabor in design view – Format headings – Remove extra subtotal row and reduce band height – Fill title with grey background – Etc. – Save with same name (rptLabor) 11 Access - Reports & Forms Factory Report Designer Results 12 Access - Reports & Forms Factory
  • 72. Report Designer  Adding Fields – Use toolbox, or – Drag and drop from field list – Set control source on property sheet if appropriate(see below) – Put SQL function around the control source for aggregate fields  Two types – Bound – Unbound (no control source) 13 Access - Reports & Forms Factory Report Designer Function 14 Access - Reports & Forms Factory
  • 73. Report Designer  Open the report Labor in design view – Add a cost column (unbound control) – Format to taste – Save report as rptLaborCost 15 Access - Reports & Forms Factory Report Designer  One more change to Labor report – Add group and grand totals to labor cost for the report – Add an unbound textbox control – Use a formula, =sum(…), as the control source – Save as rptLaborCost_2 16 Access - Reports & Forms Factory
  • 74. Labor report with Cost Column 17 Access - Reports & Forms Factory Conditional Formatting  Format, Conditional Formatting commands from Menu Bar  Can be used for forms or reports – Examines the contents of a field – Based upon field’s contents able to specify:  Font/Font size/Font color  Background color  Text attributes (boldface, underline, italics)  Try flagging stdhrs >= 70 18 Access - Reports & Forms Factory
  • 75. Subreports  Can have sub reports added to a main report – to show detail – To add related information such as customer data on an invoice  First create the sub report  Then create the main report and drag the sub report and drop it in place, or  Use the subform/sub-report control 19 Access - Reports & Forms Factory 20 Access - Reports & Forms Factory
  • 76. Sub Reports  Create a subreport named srptLaborDetail_3 – Base on qryLaborDetail_3 – Be sure to use tabular format – Eliminate extraneous title information 21 Access - Reports & Forms Factory Labor Sub Report 22 Access - Reports & Forms Factory
  • 77. Subreports  Make sure you have a permanent link between work_orders and qryLaborDetail_3  Create a main report rptWork_Orders_Main – Base on work_orders table – Expand the detail band and drag the subreport srptLaborDetail_3 into position  Format to taste 23 Access - Reports & Forms Factory Sub Reports  Drag new subreport to main report, or use sub/form subreport control  Save as rptWork_OrdersFull 24 Access - Reports & Forms Factory
  • 78. Full Work Orders Report Results 25 Access - Reports & Forms Factory Microsoft Access Reports Module P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 [End of Module] http://www.d2associates.com 26 Factory Access - Reports & Forms
  • 79. Notes 27 Access - Reports & Forms Factory Notes 28 Access - Reports & Forms Factory
  • 80. Introduction to Microsoft Access Module - Criteria Selection Forms P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 http://www.d2associates.com 1 Factory Access - Reports & Forms Module Hands On Students “hands-on”: – Create an unbound form 2 Access - Reports & Forms Factory
  • 81. Forms  Form - provides for customized data entry instead of using the datasheet window  Also used to establish criteria for reports and queries  Found on the Forms tab of the database window  Form Wizards - a series of dialog boxes prompting you about your form requirements 3 Access - Reports & Forms Factory Form Designer  Design surface for forms  Add controls from toolbox  Some controls themselves have wizards which can invoke certain actions (run query, open report, etc) 4 Access - Reports & Forms Factory
  • 82. 5 Access - Reports & Forms Factory Form Designer  Build a criteria selection form for the parameter query qryParam (use design view) – Add an unbound control named txtOrderNo – Make sure the control wizard button is depressed – Add a button which will run the param query – Run the form. What happened? Why? – Save as frmParam 6 Access - Reports & Forms Factory
  • 83. Fix the query and form then rerun Change the variable names to look at the form 7 Access - Reports & Forms Factory Criteria Selection Form Results 8 Access - Reports & Forms Factory
  • 84. Subforms  Same idea as sub reports  Main form uses parent table; sub form uses child table  Several ways to create them – Create sub form first, drag and drop to main form – Use subform/subreport control – Create with form wizard directly 9 Access - Reports & Forms Factory Introduction to Microsoft Access Module - Criteria Selection Forms P.O. Box 6142 Laguna Niguel, CA 92607 949-489-1472 [End of Module] http://www.d2associates.com 10 Factory Access - Reports & Forms
  • 85. Notes This slide intentionally left blank 11 Access - Reports & Forms Factory Notes This slide intentionally left blank 12 Access - Reports & Forms Factory
  • 86. Orange Coast Database Associates Course Material (800)355-9855 or http://www.dhdursoassociates.com Accelerated Computer Training Orange Coast Database Associates Specializing in Microsoft Office, Access, SQL, and related technologies Computer Training, Programming & Consulting 32422 Alipaz St., Suite A-15 San Juan Capistrano, CA (800)355-9855 (Toll Free) | (949)489-1472 (Direct) | (949)485-6284 (Fax) http://www.dhdursoassociates.com | sales@dhdursoassociates.com Accelerated Computer Training for Working Professionals