Using Microsoft Access

download Using Microsoft Access

of 47

Transcript of Using Microsoft Access

  • 8/12/2019 Using Microsoft Access

    1/47

  • 8/12/2019 Using Microsoft Access

    2/47

    CE 8-2

    Q1: How do I create tables?

    Q2: How do I create relationships?Q3: How do I create a data entry form?

    Q4: How can I create queries using the querydesign tool?

    Q5: How do I create a report?

    Study Questions

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall CE 8-2

  • 8/12/2019 Using Microsoft Access

    3/47

    CE 8-3

    Office.microsoft.com/en-

    us/access/default.aspx Access 2007 Help

    Access 2007 Training

    Access 2007 DemosAccess 2007 Online Course

    http://office.microsoft.com/training/training.aspx

    ?AssetID=RC101933201033

    Access Online Learning Resources

    CE 8-3Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    4/47

    CE 8-4

    Q1: How Do I Create Tables?

    Create data model from users requirements

    Transform model into database design Select a primary key

    Select a foreign key

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    5/47

    CE 8-5

    Attributes of the Database

    CE 8-5Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    6/47

    CE 8-6

    PROSPECT Data

    Table 1 CE6-2

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    7/47

    CE 8-7

    WORK Data

    Table 2 CE6-2

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    8/47

    CE 8-8

    Starting in Access

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    9/47

    CE 8-9

    Click on Blank database at top of list

    Provide file name in lower right-hand cornerbox

    Click on folder icon to browse to a folder to

    save the database file Click on Create

    Window will open to a blank table

    Creating a Database with Access2007

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    10/47

    CE 8-10

    Creating a Database with Access2007 (contd)

    Click on the View icon in top left-hand corner

    Enter a table name in the pop-up box Window will change to Design View where

    you can name the fields of the table, data type

    and field properties.

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    11/47

    CE 8-11

    Table Design View

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    12/47

    CE 8-12

    Screen has two parts

    Upper part Enter name of each attribute (Fields)

    Enter Data Type

    Enter Description (optional provides documentation)

    Bottom part

    Set properties for each field

    Creating Tables in Access, Step 1

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    13/47

    CE 8-13

    Creating Tables in Access, Step 1(contd)

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    14/47

    CE 8-14

    Creating Tables in Access, Step 2

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    15/47

    CE 8-15

    Complete Sample PROSPECT Table

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    16/47

    CE 8-16

    Finished WORK Table

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    17/47

    CE 8-17

    Creating Tables Steps (contd)

    1. Enter Field Names and Data Types

    2. Establish field lengths3. Select primary key (Click on Primary Key

    icon)

    4. Save table by clicking on diskette icon (upperleft of Window)

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    18/47

    CE 8-18

    Defining relationships

    Go to Tools Select Relationships

    Window opens

    Show Tabledialog box displayed

    Double-click on names of tables

    Tables added to Relationshipswindow

    Close Show Tabledialog box

    Q2: How Do I Create Relationships?

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    19/47

    CE 8-19

    Show Table Dialog Box

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    20/47

    CE 8-20

    Click on the attribute in one table

    Drag it on top of the attribute in the secondtable

    A dialog box appears

    Click Enforce Referential Integrity Click Cascade Update Related Fields

    Click Cascade Delete Related Fields

    Close Relationshipswindow

    Save changes

    Creating Relationship Between

    Two Tables

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    21/47

    CE 8-21

    Creating Relationship Between

    Two Tables (contd)

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    22/47

    CE 8-22

    Completed Relationship Between

    PROSPECT and WORK Tables

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    23/47

    CE 8-23

    Tables with Data Entered

    PROSPECT

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    24/47

    CE 8-24

    Tables with Data Entered

    WORK

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    25/47

    CE 8-25

    Use the default table display

    Displays related records Limited capability

    Interface not pleasing

    Use Access Form Wizard Click on Forms

    Double-click on Create form

    Select table from Tables/Queriescombo box Double-click on double chevron button

    Q3: How Do I Create a Data Entry

    Form?

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    26/47

    CE 8-26

    Enter Data with Default Table Display

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    27/47

    CE 8-27

    Click Create tab to open Create ribbon

    Click on PROSPECT table Click Form

    Access uses table metadata and relationship

    to create data entry form Add, update, delete data in the form

    Q3: How Do I Create a Data Entry

    Form? (contd)

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    28/47

    CE 8-28

    Starting the Form Generator

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    29/47

    CE 8-29

    Resulting Data Entry Form

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    30/47

  • 8/12/2019 Using Microsoft Access

    31/47

    CE 8-31

    Process for Reformatting Data Entry

    Form

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    32/47

    CE 8-32

    Access processes SQL query language

    Provides graphical interface to create queries Access generates SQL statements

    Creating queries

    Click Queries Double-click Create, then QueryDesign

    In Show Table, click to select table, then click Add

    See tables appear above Query Design form Access shows relationship between tables

    Q4: How Can I Create Queries Using

    the Query Design Tool?

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    33/47

    CE 8-33

    Creating a Query, Step 1

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    34/47

    CE 8-34

    Creating a Query, Step 2

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    35/47

    CE 8-35

    Drag columns from tables into grid

    Lower part of query definition form Click red exclamation point icon

    Access will show rows that have value

    matches in all tables Click Save icon

    Creating a Query (contd)

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    36/47

  • 8/12/2019 Using Microsoft Access

    37/47

    CE 8-37

    Results of TotalDonationsQuery

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    38/47

    CE 8-38

    Result of More Advanced Query

    NameAndDonation

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    39/47

    CE 8-39

    Double-click Create

    Select Report Wizard

    Select table in Table/Queriescombo box

    Highlight table PROSPECT, highlight Name in AvailableFieldslist

    Click single chevron >

    Add EmailAddressthe same way

    Select WORKtable, add fields Date, Hour, NumCalls,

    TotalDonations Click Finish

    Q5: How Do I Create a Report?

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    40/47

    CE 8-40

    Selecting Data to Show in a Report

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    41/47

    CE 8-41

    Report Design View

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    42/47

    CE 8-42

    Click Group and Sortin Grouping & Totals

    section of ribbon Bottom of form, click More

    Then click down arrow to with no totals

    Click Reporticon in Viewsection of ribbon See result on next slide

    Grouping and Totaling

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    43/47

    CE 8-43

    Report with Sum of TotalDonations

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    44/47

    CE 8-44

    Changing Size of EmailAddressField

    in Layout View

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    45/47

    CE 8-45

    Final Version of Report

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    46/47

    CE 8-46

    Q1: How do I create tables?

    Q2: How do I create relationships?Q3: How do I create a data entry form?

    Q4: How can I create queries using the query

    design tool?Q5: How do I create a report?

    Active Review

    Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

  • 8/12/2019 Using Microsoft Access

    47/47

    CE 8-47

    All rights reserved. No part of this publication may be reproduced, stored in aretrieval system, or transmitted, in any form or by any means, electronic,

    mechanical, photocopying, recording, or otherwise, without the prior writtenpermission of the publisher. Printed in the United States of America.

    Copyright 2010 Pearson Education, Inc.Publishing as Prentice Hall