ms access 2007 basics.pdf

Upload: miah-rashiduzzaman

Post on 04-Jun-2018

229 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/14/2019 MS Access 2007 Basics.pdf

    1/31

    Access 2007: BasicsLearning Guide

    Exploring AccessAt first glance, the new Access 2007 interface may seem a bit unsettling,with fat bands called Ribbonsreplacing cascading text menus and taskbars and the Navigation Panereplacing the Database Window. This guidewill help put you at ease as it introduces you to the new design and

    explains the new nomenclature.

    Office

    Button

    Quick Access

    Toolbar

    Ribbons WorkspaceNavigation

    Pane

    1

  • 8/14/2019 MS Access 2007 Basics.pdf

    2/31

    The Office Button

    The Office button, located in the top left corner of your screen, replacesthe File menu found in earlier versions of Access. The Office buttonallows you to carry out many functions, such as saving, printing, andopening your document.

    2

  • 8/14/2019 MS Access 2007 Basics.pdf

    3/31

    The Quick Access Toolbar

    The Quick Access toolbar, located to the right of the Office button,contains the three most frequently used buttons, Save, Undo, and Redo.

    You can customize the Quick Access toolbar and add any button that youfrequently use. To add any button to the Quick Access toolbar:

    Click on the down-facing arrow at the far right of the Quick Accesstoolbar.

    If the command you wish to add appears in the resulting menu, clickon it to add it to the toolbar. Otherwise, select More Commands.

    From the Choose commands from: drop-down box, select AllCommands and locate the command you wish to add in the scrollpanebelow. Click Add >> once youve made your selection to add thecommand. Click OK to save your actions.

    3

  • 8/14/2019 MS Access 2007 Basics.pdf

    4/31

    Ribbons

    Located where taskbars used to be, Ribbons graphically display thechanging features as you click on the menu-bar tabs. It may be take youtime to adjust to the new locations of familiar options, but Ribbons may

    expose you to new commands and tools. The image and table shownbelow will help familiarize you with the various options.

    The Ribbon Allows you to

    Home Change the current view, adjust the Font orParagraph styles, manage Records, and Sort orFilter data.

    Create Add new tables, forms, queries, and reports to your

    database.

    External Data Import, export and collect data to/from other

    sources.Database Tools Create macros, manage relationships between

    tables, and create security permissions.

    Hiding and Redisplaying Ribbons

    If you wish to have more room while working, you can hide the contentsof the ribbons. To hide the ribbons:

    Double-click on one of the ribbons. To redisplay the contents of the ribbons, double-click on them a

    second time.

    The Navigation Pane

    Access databases have four primary components, called objects, each ofwhich has a different purpose. All of the components can be accessed andmanaged from the Navigation Pane.

    The Object. . . Displayed as . . . Allows for

    Tables Data storage

    Queries Filtering data

    Forms Easy data entry

    Reports Printing data

    4

  • 8/14/2019 MS Access 2007 Basics.pdf

    5/31

    Database BasicsA database, at its very core, is a structured collection of data. Accessstores all your data in the form of atablethat is composed of rows andcolumns.

    Each row, called arecord, contains data about a single object, person, orconcept. In the table below, row 2 (Record 2) contains all the informationabout an order taken on 6/21/2005 for 100 computer at a price of $50 percomputer.

    Each column, called afield, contains a specific type of data (numbers,text, currency, dates, etc.). In the table below, field 2 (Client #) containsthe client information for all the records.

    Once this structure is in place, you can access your information directlythrough the table, or use one of the other database objects for greaterflexibility in display and organization. For example, you can enter datausing forms or create reports to present your data.

    Sample table

    5

  • 8/14/2019 MS Access 2007 Basics.pdf

    6/31

    Sample form

    Sample report

    Is Access the right tool to manage your data?

    Although Access provides great flexibility and powerful tools formanaging your data, developing a database often takes a great deal of

    time. Before creating your database, consider whether other datamanagement tools might be more appropriate for your project:

    Word tables: quick and easy to create; good for data that does notneed to be sorted

    Excel spreadsheets: Easier to create than a database; provides sortingand calculation capabilities

    When considering how to manage your data, remember that you canupgrade your data structure Word tables can be converted to Excelspreadsheets, which can then be imported into Access tables.

    6

  • 8/14/2019 MS Access 2007 Basics.pdf

    7/31

    TablesTables are used in Access to manage and store all data that is entered.Within a database you can add records in the datasheet view of an existingtable or create a new table.

    Entering Records in an Existing TableTo enter records into an existing table using the Datasheet View:

    From the Navigation Pane, double-click on the table into which youwant to enter data.

    The table will open in datasheet view. Click in an empty field and begin typing.

    To move between fields:o Press the Tabkey to move one field to the righto Simultaneously press down the Shiftkey and the Tabkey to

    move one field to the left.o Click in any field to move to that field.

    To edit data that has already been entered, move your cursor to thatfield. Any data in that field can be edited as if it were text in any otherdocument.

    Once you have finished adding records, click on the Closebutton atthe top right corner of the window.

    7

  • 8/14/2019 MS Access 2007 Basics.pdf

    8/31

    Creating a New Table in Design View

    To create a new table to enter your data:

    Locate the Tables area of the Create ribbon. Click on the button labeled Table Design.

    The Table window will open.

    Creating New Fields

    Click in the first empty cell of the column labeled Field Name. Type the name of your new field. Be sure to generate a name that will

    be descriptive of the fields contents.

    Move your cursor to the Data Typecolumn. Select the type of data you wish to include in the new field. Below is a

    list of the most commonly used field types:o Texto Numbero Date/Timeo Currency (a specially-formatted number field)o Yes/Noo AutoNumber (a unique number for each record)

    8

  • 8/14/2019 MS Access 2007 Basics.pdf

    9/31

    Move your cursor to the Descriptioncolumn. Type a brief description of the data that will be included in this field. Repeat these steps to add additional fields to your table.

    Defining the Primary KeyPrimary keys are used in establishing appropriate relationships betweentables. To define a primary key in Design View:

    Click on the field you wish to set as the primary key. Locate the Tools area of the Design ribbon. Click on the button labeled Primary Key.

    A gold key icon will appear next to the field you have selected.

    Saving your Table and Returning to the Datasheet View

    Once you have added all the necessary fields to your table and define yourprimary key, you must save your table.

    From the quick access toolbar, click on the Savebutton.

    Locate the Views area of the Design ribbon. Click on the Viewbutton to return to the datasheet view of your table.

    9

  • 8/14/2019 MS Access 2007 Basics.pdf

    10/31

    Resizing Columns

    Once you have created your table and returned to the Datasheet View,you may notice that the columns are not wide enough (or too wide). Toresize a column:

    Place your cursor on the right edge of the column you wish to resize. Drag the cursor to the right (or left) until your column is the size youdesire.

    To size a column to fit the entered data, double-click on the right edgeof the column header.

    Tip: Changing or Adding FieldChanging a Fields Name

    Open up your table in design view. Double-click on the field name you wish to change. Type the new field name you wish to use.Adding a Field in the Middle of a Table

    Open up your table in design view Click on the row below where you wish to add the field. Locate the Tools area of theDesign ribbon. Click on the button labeledInsert Rows.

    10

  • 8/14/2019 MS Access 2007 Basics.pdf

    11/31

    Adding a field to the end of the table:

    In the first blank row of your table, type in theField Name Select theData Typeyou desire Add in aDescription

    Creating Relationships between Tables

    You can create relationships between tables in your database to show howthe columns in one table are linked to the columns in another table.Relationships help prevent redundancy in the data entered into yourdatabase. To create relationships:

    Locate the Show/Hide area of the Database Tools ribbon. Click on the button labeled Relationships.

    The Relationships window will appear.

    The Design ribbon should also appear at the top. From theRelationshipstab, click on the Show Tablebutton.

    11

  • 8/14/2019 MS Access 2007 Basics.pdf

    12/31

    The Show Table window will appear with all of the tables and queriesin your database listed.

    Adding a Table to Include in a Relationship

    Click on the name of the table you wish to include in a relationship. Click on the button labeled Add. Repeat these steps until you have added all necessary tables. Click on the button labeled Close. All of the tables you added will appear in the window labeled

    Relationships.

    12

  • 8/14/2019 MS Access 2007 Basics.pdf

    13/31

  • 8/14/2019 MS Access 2007 Basics.pdf

    14/31

  • 8/14/2019 MS Access 2007 Basics.pdf

    15/31

    To display the . . . Click on . . .

    First record in the form

    Previous record

    Next record

    Final record in the form

    Filtering Records

    To search for a specific record in your database to edit in your form:

    Click in the field that you wish to use for your search. Locate the Sort & Filter area of the Home ribbon. Click on the button labeled Filter.

    From the menu that appears, select Text Filter. From the submenu that appears, select Equals.

    The Custom Filter window will appear. Type the criteria for your search in the box labeled equal to. Click on the button labeled OK.

    15

  • 8/14/2019 MS Access 2007 Basics.pdf

    16/31

    Any records matching your criteria will display on your form. Locate the Sort & Filter area of the Home ribbon. Click on the button labeled Toggle Filterto remove the filter and view

    all records.

    Creating a New Form with the Form Wizard

    To create a new form to use for data entry:

    Locate the Forms area of the Create ribbon. Click on the button labeled More Forms. Select Form Wizard.

    The Form Wizard will appear.

    Click on the down-facing arrow of the box labeled Tables/Queries. Select the table into which you want your form to enter data.

    16

  • 8/14/2019 MS Access 2007 Basics.pdf

    17/31

    From the box labeled Available Fields, double-click on the name ofthe field you want to include in your form.

    To include all fields, click on the double right-facing arrow.

    Click on the button labeled Next.

    From the window that appears, select the layout you wish to use foryour form (for example, columnar).

    Click on the button labeled Next.

    17

  • 8/14/2019 MS Access 2007 Basics.pdf

    18/31

    From the window that appears, select the style you wish to use foryour form (for example, Access 2007).

    Click on the button labeled Next.

    In the box labeled What title do you want for your form, type adescriptive name for your form (for example, frm_OrderNumbers).

    Click on the button labeled Finishand your form will open in a newwindow.

    18

  • 8/14/2019 MS Access 2007 Basics.pdf

    19/31

    QueriesA query is an Access object that can display data from one or more tablesin an orderly fashion. A query retrieves select fields from every record ina database and may be executed from tables and existing queries.

    Viewing the Results of an Existing Query From the Navigation Pane, double-click on the query with results you

    wish to view.

    The query will open in datasheet view.

    19

  • 8/14/2019 MS Access 2007 Basics.pdf

    20/31

    Filtering Data in an Existing Query

    Filtering data returned by your query allows you to only view data thatmeets certain conditions. One or more filtering criteria can be added toeach field. To create a filter:

    From the Navigation Pane, right-click on the name of the query towhich you wish add criterion.

    From the menu that appears, select Design View.

    Decide which field you wish to use in your filter, and select a criterionthat must be met by any data that is retrieved.

    o In the example below, qry_OrderNumbesanswers thequestion Who are my clients and how many computers didthey order?

    o Use of a filtering criterion might produce a more restrictive setof data that retrieves data to answer Which of my clients

    ordered more than 1000 computerso In this case, the chose filtering criterion is greater than 1000

    computers.

    20

  • 8/14/2019 MS Access 2007 Basics.pdf

    21/31

    In the design grid, click in the Criteriacell for the field that willreceive a filtering criterion (in this example, click in the Criteria cellfor NoComputersOrdered).

    In the Criteriacell, type in the filtering criterion for your field.

    Click on the Savebutton located on the Quick Accesstoolbar.

    Locate the Results area of the Design ribbon. Click on the button labeled Run.

    The results of your query will appear in datasheet view.

    Criteria Cell forNumber of Computers

    21

  • 8/14/2019 MS Access 2007 Basics.pdf

    22/31

    Query Operators

    Filters can be created using the following operators:

    Operator Description

    > Greater Than

    < Less Than= Equal To

    >= Greater Than or Equal To

  • 8/14/2019 MS Access 2007 Basics.pdf

    23/31

    Switching between Design View and Datasheet View

    To switch between design view (used to apply query criterion) anddatasheet view (used to view query results):

    Locate the Results area of the Design Ribbon. Click on the button labeled Viewto switch from DesignViewto

    Datasheet View.

    Once you are in the Datasheet Viewmode, click on the Viewbutton asecond time to return to Design View.

    Creating a New Query in Design View

    Locate the Other area of the Create ribbon. Click on the button labeled Query Design.

    The Show Table window will appear.

    23

  • 8/14/2019 MS Access 2007 Basics.pdf

    24/31

    Click on the name of the table you wish to query from. Click on the button labeled Add.

    Repeat these steps until you have selected all tables. The tables you selected will appear at the top of the query window.

    Adding Fields to Your Query

    Double-click on the name of the field you wish to add to your query. The name of the field will appear in the next available column.

    Repeat the above steps until you have added all desired fields for yourquery.

    Locate the Results area of the Design ribbon.

    24

  • 8/14/2019 MS Access 2007 Basics.pdf

    25/31

  • 8/14/2019 MS Access 2007 Basics.pdf

    26/31

    Viewing an Existing Report

    From the Navigation Pane, double-click on the report you wish toview.

    The report will open in a new window.

    Creating a New Report with the Report Wizard

    To create a new report to display data:

    Locate the Reports area of the Create ribbon. Click on the button labeled Report Wizard.

    The Report Wizard will appear.

    26

  • 8/14/2019 MS Access 2007 Basics.pdf

    27/31

  • 8/14/2019 MS Access 2007 Basics.pdf

    28/31

  • 8/14/2019 MS Access 2007 Basics.pdf

    29/31

    Click on the button labeled Summary Options.

    The Summary Options window will appear. Click to place check marks in the boxes with summaries you wish to

    display in your report.

    Click on the button labeled OK.

    Click on the button labeled Next.

    29

  • 8/14/2019 MS Access 2007 Basics.pdf

    30/31

    From the window that appears, select the layout you wish to use foryour report.

    Click on the button labeled Next.

    From the window that appears, select the style you wish to use foryour report (for example, Access 2007).

    Click on the button labeled Next.

    30

  • 8/14/2019 MS Access 2007 Basics.pdf

    31/31