Microsoft Using an Existing Database Amarillo College Revision Date: July 30, 2008

Similar documents
Introduction to Microsoft Access 2013

Introduction to Microsoft Access 2010

Microsoft Access 2010 handout

Microsoft Access 2010 Part 1: Introduction to Access

Using an Access Database

MS Access Lab 2. Topic: Tables

Chapter 5. Microsoft Access

Lesson 07: MS ACCESS - Handout. Introduction to database (30 mins)

Creating a Database in Access

Introduction to Microsoft Access 2003

Using Microsoft Access Databases

Use Find & Replace Commands under Home tab to search and replace data.

MICROSOFT ACCESS 2003 TUTORIAL

Microsoft Access Basics

Table and field properties Tables and fields also have properties that you can set to control their characteristics or behavior.

IN THIS PROJECT, YOU LEARN HOW TO

Microsoft Access Part I (Database Design Basics) ShortCourse Handout

Creating and Using Databases with Microsoft Access

Creating tables in Microsoft Access 2007

Introduction to Microsoft Office Access 2010

Access 2007 Creating Forms Table of Contents

Creating a Database using Access 2007

If the database that is required is similar to a template then whole database can be generated by using a template that already exists.

Simple Invoicing Desktop Database with MS Access c 2015 by David W. Gerbing School of Business Administration Portland State University

Microsoft Access 2010 Overview of Basics

Ohio University Computer Services Center August, 2002 Crystal Reports Introduction Quick Reference Guide

Tutorial 3. Maintaining and Querying a Database

Microsoft Office 2010

Creating and Using Forms in SharePoint

Planning and Creating a Custom Database

MICROSOFT ACCESS STEP BY STEP GUIDE

ACCESS 2007 BASICS. Best Practices in MS Access. Information Technology. MS Access 2007 Users Guide. IT Training & Development (818)

Objectives. Understand databases Create a database Create a table in Datasheet view Create a table in Design view

Microsoft Excel 2010 Tutorial

Handout: Word 2010 Tips and Shortcuts

Microsoft Query, the helper application included with Microsoft Office, allows

Excel 2007: Basics Learning Guide

Microsoft Access 2007 Introduction

Getting Started with Excel Table of Contents

Microsoft Access 2007

User Services. Microsoft Access 2003 II. Use the new Microsoft

Check out our website!

How To Create A Powerpoint Intelligence Report In A Pivot Table In A Powerpoints.Com

How To Understand The Basic Concepts Of A Database And Data Science

Introduction to Microsoft Access 2007

Tutorial 3 Maintaining and Querying a Database

Access Tutorial 3 Maintaining and Querying a Database. Microsoft Office 2013 Enhanced

Microsoft Access Introduction

Lab 2: MS ACCESS Tables

How To Create A Database For Employee Records In A Club Account In A Computer System In A Cell Phone Or Cell Phone With A Cell Computer (For A Cell)

Access Creating Databases - Fundamentals

Create a New Database in Access 2010

What is a database? The parts of an Access database

Access Queries

Decision Support AITS University Administration. Web Intelligence Rich Client 4.1 User Guide

Structure a Database. Key Concepts LESSON. Access 380. Lesson 2: Structure a Database. Standards

MICROSOFT ACCESS 2007 BOOK 2

COURSE DESCRIPTION. Queries in Microsoft Access. This course is designed for users with a to create queries in Microsoft Access.

MS Excel. Handout: Level 2. elearning Department. Copyright 2016 CMS e-learning Department. All Rights Reserved. Page 1 of 11

MICROSOFT OFFICE ACCESS LEVEL 1

Access 2010: The Navigation Pane

Microsoft Office. Mail Merge in Microsoft Word

Excel Unit 4. Data files needed to complete these exercises will be found on the S: drive>410>student>computer Technology>Excel>Unit 4

Microsoft Excel 2010 Part 3: Advanced Excel

Using Microsoft Office to Manage Projects

Filter by Selection button. Displays records by degree to which they match the selected record. Click to view advanced filtering options

Exploring Microsoft Office Access Chapter 2: Relational Databases and Multi-Table Queries

Microsoft Access 2007 Module 1

MICROSOFT OUTLOOK 2010 WORK WITH CONTACTS

Computer Science 125. Microsoft Access Project

BusinessObjects: General Report Writing for Version 5

Microsoft Access 2000

Using Microsoft Access

Basic Microsoft Excel 2007

Access 2010 Intermediate Skills

Customized Reports using Microsoft Access 2010

Querying a Database Using the Select Query Window

Excel 2007 Basic knowledge

Steps to Create a Database

European Computer Driving Licence

Lab Manual. Databases. Microsoft Access. Peeking into Computer Science Access Lab manual

BUSINESS OBJECTS XI WEB INTELLIGENCE

Crystal Reports Payroll Exercise

Access I Tables, Queries, Forms, Reports. Lourdes Day, Technology Specialist, FDLRS Sunrise

Working together with Word, Excel and PowerPoint 2013

Microsoft Access 2010: Basics & Database Fundamentals

MICROSOFT OFFICE ACCESS NEW FEATURES

ACCESS Importing and Exporting Data Files. Information Technology. MS Access 2007 Users Guide. IT Training & Development (818)

Access NAMES Computerized Database

Section 4. Mastering Folders

To determine the fields in a table decide what you need to know about the subject. Here are a few tips:

Microsoft Access 2010

Creating Custom Crystal Reports Tutorial

Access 2010: Creating Queries Table of Contents INTRODUCTION TO QUERIES... 2 QUERY JOINS... 2 INNER JOINS... 3 OUTER JOINS...

Transcription:

Microsoft Amarillo College Revision Date: July 30, 2008

Table of Contents GENERAL INFORMATION... 1 TERMINOLOGY... 1 ADVANTAGES OF USING A DATABASE... 2 A DATABASE SHOULD CONTAIN:... 3 A DATABASE SHOULD NOT CONTAIN:... 3 UNDERSTANDING DATABASE VIEWS... 4 DATASHEET VIEW... 4 DESIGN VIEW... 5 FIELDS... 6 RESIZING A FIELD... 6 MOVING A FIELD... 6 HIDING/UNHIDING FIELDS (COLUMNS)... 6 INSERTING A NEW FIELD... 7 DELETING A FIELD... 7 RECORDS... 8 INSERTING A NEW RECORD... 8 FINDING A PARTICULAR RECORD... 8 DELETING A RECORD... 9 SORTING RECORDS... 10 FILTERS... 11 FILTER BY SELECTION... 11 FILTER BY FORM... 12 SAVING A DATABASE... 13 FORMS... 14 PRINTING A SINGLE RECORD IN A FORM... 14 QUERIES... 15 RUNNING A PREVIOUSLY-CREATED QUERY... 15 CREATING A NEW QUERY... 16 REPORTS... 17 RUNNING AN PREVIOUSLY-CREATED REPORT... 17 CREATING A NEW REPORT... 18 i

GENERAL INFORMATION Terminology Database An organized collection logically-related data stored in a structured format. Technically, a database can consist of one or more tables of data that are related in some way. For instance, you could track all the information about the students in a school in a student s table. If you then created separate tables containing details about teachers, classes and classrooms, you could combine all four tables into a database. Relational Database - A collection of two or more tables that are linked together. Relationships between each table are required to link those tables correctly. Most new database have this structure. If data is organized in this type of database, you can treat these multiple tables as a single storage area and pull information electronically from different tables in whatever order meets your needs. Table - The only physical storage space for data in a database. Record - A record contains all the data about a single member of a table. For example, in a student table, data such as first name, last name, address, city, state, zip are stored for each student in the table. Field - A record contains multiple pieces of data called fields. A field is the smallest unit of named data that is recognized by the database program. Primary Key - A field, or collection of fields, that uniquely identifies a given record in a table. The data in this field has to be unique for each record. It cannot be the same in any two records. Composite Key - A primary key that consists of more than one field. Page 1

Advantages of Using a Database 1. Getting more information from the same amount of data. The primary goal of a computer system is to transform recorded facts into information. You can start to notice relationships between the records and make decisions based on these observations. 2. Sharing data The data entered from many different users can be combined and shared among all authorized users, allowing all users to retrieve data from a great pool. 3. Easier to change data If data is changed in only one place, all other people will have access to the corrected information. The same data will not have to be changed in multiple places. 4. Balancing conflicting requirements It is possible to have one person or group, called a Database Administrator, to be in charge of maintaining the database. By looking out for the company as a whole, it can force data entry that is better for the company. 5. Controlling data redundancy data is stored only once, and not in multiple places, which decreases the amount of space needed for storage. 6. Consistency of data By reducing the number of places that similar data is stored, the likelihood for having mistakes is reduced. 7. Integrity of data Integrity rules can be enforced that do not allow some data entry mistakes to be made. For example, a record cannot be deleted from a table if it has related records in another table that are dependent on the record. 8. Security Security passwords can be used to prevent unauthorized access to the database. 9. Productivity is increased Many repetitive tasks can be automated. 10. Data independence The structure of a database can be changed without the programs that access the database having to change. Without data independence, much unnecessary effort can be expended in changing programs to match the new structure of the database. Page 2

A Database Should Contain: 1. Separate tables, each containing relevant related information. 2. Data that does not change. For example, year-of-birth compared to age. 3. Space for possible expansion areas. 4. Normalized data. This means data that have been broken down into its purest form to keep data redundancy down. A Database Should NOT Contain: 1. Data that can be calculated when a report is printed. 2. Data that constantly changes. 3. Multiple data items in a single field. 4. Do not store the same data in separate tables. 5. Do not have large fields for small amounts of data. Page 3

UNDERSTANDING DATABASE VIEWS There are two main views in Access 2007. Design View is used to construct tables, where fields can be added, deleted, or modified. The Datasheet View can be used to enter data into records. 1. Start Access 2007, and click the icon, located at the right side of the window. 2. Navigate to the drive and folder in which the database is stored. 3. Double-click the database file. 4. At the left side of the window, look to see what type of object is being displayed: 5. If the word, Tables is not displayed, click the drop-down arrow to choose Tables. 6. At the left side of the window, double-click the table to be opened. 7. Maximize the window and then maximize the table inside the window. Datasheet View This view is preferred by many people because it resembles an Excel worksheet with which most people are more familiar. Data displayed in any of the cells of the datasheet can be edited by clicking on the cell and then typing the new data into the cell. Whenever the cursor is moved from the edited cell, the contents of the datasheet are automatically saved! Page 4

ICONS By clicking on the icon located on the ribbon, you will change the view to Design View. By clicking on the View. icon located on the ribbon, you will change the view to Datasheet Design View In Design View, the table s structure (not its data) can be edited. This view is not used very often. Once the fields have been created and set up, the Design View is rarely used again. New fields can be created Fields properties can be changed Current fields can be changed Fields can be used as primary keys Page 5

FIELDS Microsoft Access 2007 A field is a single piece of data that makes up part of a record. For example, the last name of a person would be stored in a separate field than the field containing the zip code. Resizing a Field This procedure does not widen the actual field. It simply displays the field differently on the monitor. 1. View a database table in Datasheet View. 2. Click-and-drag the separator line (the mouse pointer turns into a double-sided black arrow illustrated below) between the field name of the column that is to be widened and the field name of the column to the right. Drag the separator line to the right to widen the column. Moving a Field 1. View the table in Datasheet View. 2. Click (one time) the field name to be moved. This highlights the field. 3. Next, click-and-drag the field s name to a new location and release it. 4. When you exit Access, a message will appear asking if you want to save the file. If you choose No then the field will be in its original position when the file is opened again. Hiding/Unhiding Fields (Columns) When viewing data, you may not want to see all of the fields at one time. Therefore, hiding fields is an easy way to see only the desired data. 1. View the table in Datasheet View. 2. Right-click the desired field name and choose Hide Columns. 3. Print as needed. 4. Right-click any field name and choose Unhide Columns. 5. Place a checkmark in front of the hidden column(s). 6. Page 6

Inserting a new Field 1. View the table in Design View by clicking the Design View icon, located on the Home tab. 2. If the field is to be placed between two existing fields, do the following: a. Right-click the gray box in front of the field that needs to be moved downward to make room for the new field. b. Choose Insert Rows. 3. Place the cursor in the first cell of the destination row and type a name for the new field. 4. In the second cell, use the drop-down arrow to specify the type of data that will be stored in the field. If it is a zip code (or other number that is not to be used in calculations), specify text. Data Type Description Size Text (Most common data type) Alphanumeric data Up to 255 characters Memo Alphanumeric data; sentences and paragraphs Up to 64,000 characters Date/Time Dates and times 8 bytes Currency Dollar formatted data, stored with 8 bytes 4 decimal places Auto-Number Unique value generated by 4 bytes Access for each new record. Cannot be changed by user. Yes/No True/False type of data 1 bit OLE Object Pictures, Graphs, or other ActiveX Up to 1 gigabyte objects Hyperlink A link to a document or file on the Web, local network, or personal computer s hard drive Up to 2,048 characters 5. In the third field, add a short text description for the field. 6. In the Field Properties area at the bottom of the screen, change the field properties as needed. It is a scrollable list of properties. 7. When you leave Design View, you will be required to save the file. Deleting a Field 1. View the table in Design View (directions listed above) 2. Click the gray box to the left of the field to be removed and press the DELETE key. 3. When you leave Design View, you will be required to save the file. Page 7

RECORDS Records are collections of different pieces of related data pertaining to one item. For example, the name, address, city, state and zip code of a person or store would be a single record. Records are individual rows of data stored in tables. Inserting a new Record 1. View the table in Datasheet View. 2. If there are many records in the table, the fasted way to create new record is to click the New (Blank) Record icon, located on the Record Navigation Bar at the bottom of the database window. 3. Add data to the first field in the new record and use the TAB key to move to the next field. Data Entry Shortcut: Press CTRL + in a cell to insert the same data from the cell directly above the current cell. 4. To save the new record, simply move the cursor to any other record! Finding a Particular Record 1. View the table in Datasheet View. 2. Place the cursor anywhere in the field in which to search. 3. Press CTRL +F and then type the text to be searched for. 4. The Look In field limits your search to either the current field or every field. 5. If the text is only a part of a larger group of text characters, click the drop-down arrow for the Match field, illustrated below, and specify Any Part of Field. Page 8

6. If the case has to match exactly, place a checkmark in the Match Case box at the bottom of the window. 7. Deleting a Record A record cannot be deleted from the primary table in a one-to-many relationship. 1. View the table in Datasheet View. 2. Click the gray box to the left of the record (illustrated below) to be removed and press the DELETE key. 3. Click the Yes button when prompted. Click Here Page 9

Sorting Records Sorting by a Single Field 1. View the table in Datasheet View. 2. Right-click any cell in the field by which the table is to be sorted and choose whether to sort in (ascending) or (descending) order. Sorting by Multiple Fields 1. Identify which field will act as the Outer or main sort and the one which will be the Inner or secondary sort. The Inner sort runs first! For example, we need to sort all the records by state in ascending order and then by zip code in descending order. Zip Code would be the Inner Sort because it is run first before the main sort places the records in order by State. State would be the Outer Sort because it is the main sort and is runs last. 2. Right-click anywhere in the field acting as the innermost sort and choose whether to sort in ascending or descending order. 3. Right-click anywhere in the field acting as the Outer sort and then choose whether to sort the data in ascending or descending order. Clearing a Sort 1. On the Home tab, click the Clear All Sorts icon, located on the Sort & Filter ribbon. Page 10

FILTERS Filtering records allows you to display information from a table that meets particular criteria. For example, you could list all the students in the table who live in Canyon. Filter by Selection 1. Open the table in Datasheet View and place the cursor in a cell containing data that you wish to use as filter criteria. 2. On the Home tab, click the icon, located on the Sort & Filter ribbon. 3. From the small menu that appears, specify how you want the data to be searched. NOTE: From the list of extracted records, if you perform the same steps on another piece of data, you can extract records from the first group of culled records. 4. Right-click any cell in the filtered field and choose Clear Filter For example, if you filtered the records by the State field, you would click on the option to, Clear Filter from State. Page 11

Filter by Form 1. Open the table in Datasheet View and place the cursor in a cell containing data that you wish to use as filter criteria. 2. On the Home tab, click the icon, located on the Sort & Filter ribbon. 3. Click the icon to open the form. 4. Click in a field to be used as a criterion. 5. Either use the drop-down arrow to enter the filter criteria or type the criteria, using examples in the next table. More than one field can be used at a time. 6. On the Home tab, click the icon, located on the Sort & Filter ribbon. 7. On the Home tab, click the icon, located on the Sort & Filter ribbon, and then click the to bring back all the records. NOTE: See the next table for some Filter by Form syntax examples. Format Like *Street Like *Street* Filter-by-Form Examples Results of the Format Selects all records that end with Street Selects all records with the letters street anywhere in the record. C* The data in the field must start with the letter C < N Selects all records that begin with the letters A through M >5/1/00 Selects all dates since May 1, 2000 <>0 Selects all records not equal to the value zero The field may contain anything except the letters, CA Not CA $###,###.00 Displays a dollar sign in the first position, and a comma in the correct spot. 2 digits past the decimal will also be displayed. 100 or 200 Value must either be 100 or 200, and nothing else. Between 1 and 50 TX or CA or NE Selects all the values between 1 and 50, inclusively Selects all records with either TX or CA or NE in the field. The computer will place the quotation marks around TX, CA, and NE. Page 12

SAVING A DATABASE The process of saving is entirely different in Access compared to the other Office applications. There are two items that get saved in a database (entirely differently): the data in each record and the table layout itself Saving the Data in Each Record 1. After typing data into a new record, the record is automatically saved when the cursor is moved to a different record. Saving the Table Layout The table layout includes the color of the datasheet gridlines, the color of the datasheet background, the column widths, and any sorting that has been done. 1. Click the MS Office Button and then click the Save button. Or, another way to save a table is to exit the program. When exiting, Access will ask if you want to save the table or not. Page 13

FORMS Microsoft Access 2007 1. Open the database in Access 2007. 2. At the left side of the screen, click the drop-down arrow and choose Forms. 3. At the left side of the screen, double-click the desired form. 4. Maximize the form if desired. 5. On Home tab, click the drop-down arrow on the View icon, located on the Views ribbon. 6. At the bottom of the database window, click the New (blank) Record icon to clear the form. 7. Add data to the form fields as needed. 8. Go to other records by using the navigation bar at the bottom of the screen and edit the data in the desired record as needed. Printing a Single Record in a Form 1. Open the form and display the desired record. 2. Use CTRL +F to search for text if needed. 3. Click the Form Selector icon, located at the left side of the form. 4. Click the MS Office Button and then click Print. 5. Click the option button for Selected Record(s). 6. Page 14

QUERIES Queries are some of the most powerful features of a database. They allow you to extract information like a filter, but you can save and reuse a query. Reports can be built on records extracted through queries. Running a Previously-Created Query 1. Open the database in Access 2007. 2. If the menu of objects (illustrated at the left) is not visible, click the drop-down arrow icon (circled in the illustration) to see the list. 3. From the list of objects, click Queries. 4. Double-click the query to be run. The list of records will update accordingly. Page 15

Creating a New Query 1. Open the database in Access 2007. 2. At the left side of the screen, click the drop-down arrow and choose Queries. 3. On the Create tab, click the Query Design icon, located on the Other ribbon. 4. Double-click each table to be added to the design. Fields from any table in the design can be added to the new query. 5. 6. If needed, drag the bottom border of each table downward to make each table large enough to see all of its fields. 7. Double-click each desired field (from any visible table) to add to the query. 8. On the Criteria line in the grid, specify which records are to be extracted. If no criteria are entered, all records will be displayed. For example, if all the records in a table are to be displayed from Texas, type TX into the State field. 9. If you place criteria on the Or line, you can force the query to look for fields based upon two or more pieces of information instead of just one. NOTE: Each row below the bottom Or row is also considered another Or row. 10. Any field listed in the grid that has a checkmark will be displayed. 11. If the records are to be sorted by a particular field, click the Sort row in that field and use the drop-down arrow to specify the sort order. 12. To save the query, right-click the blue title bar of the query window (the default name of the query is Query1 or something similar) and choose. 13. Type a name for the new query and press ENTER. Page 16

REPORTS Reports are printable documents based on database tables or queries. Running an Previously-Created Report 1. Open the database in Access 2007. 2. Click the drop-down arrow icon (circled in the illustration at the left) and choose Reports. 3. Double-click the report to be displayed. 4. Print the report as needed. Page 17

Creating a New Report 1. Open the database in Access 2007. 2. At the left side of the screen, click the drop-down arrow and choose Reports. 3. On the Create tab, click the icon, located on the Reports ribbon. 4. In the Tables/Queries field, use the drop-down arrow to choose the first table or query to be analyzed. 5. Double-click each desired field to be added to the report. NOTE: If you accidentally add a wrong field, click the field and then click the button. 6. Repeat steps #4-#5 for each table or query to be used to supply fields for the report. 7. 8. 9. If you want to sort the records in the report, use the drop-down arrow to choose a field by which to sort. 10. Page 18

11. Specify which layout to use. Most often, we use Tabular. 12. 13. Click different styles until you find one that you want to use for the report. 14. 15. Type a name for the new report. 16. Page 19