Sunteți pe pagina 1din 91

ACCESS 2000 - LEVEL 1

NANCY WALLACE JUNE 2003

Page 2

TABLE OF CONTENTS
OBJECTIVES ................................................................................................................... 1 GETTING STARTED ...................................................................................................... 3 ACCESS DATABASE: DEFINITIONS ....................................................................... 7 TABLES........................................................................................................................... 11 TABLE WIZARD......................................................................................................... 13 WORKING IN THE DATABASE WINDOW ............................................................ 15 ENTERING DATA ...................................................................................................... 19 VIEW DATA ................................................................................................................ 19 MODIFY DATA........................................................................................................... 19 TABLE DESIGN .......................................................................................................... 21 DATA TYPE DEFINITIONS....................................................................................... 23 ADVANCED DATA TYPES....................................................................................... 25 FIELD PROPERTIES................................................................................................... 31 TABLE RELATIONSHIPS ........................................................................................... 35 HELP................................................................................................................................ 36 HELP FROM OFFICE ASSISTANT........................................................................... 37 HELP FROM THE WEB............................................................................................... 39 HELP FROM THE MENU BAR ................................................................................. 41 FORMS ............................................................................................................................ 43 SWITCHBOARD MANAGER .................................................................................... 45 FORM WIZARD .......................................................................................................... 51 FORM MODIFICATION............................................................................................. 53 QUERIES......................................................................................................................... 57 QUERY WIZARD........................................................................................................ 57 SELECTION QUERIES............................................................................................... 59 COMMON EXPRESSIONS......................................................................................... 61 EXPRESSIONS FOR FIELD ROW............................................................................. 63 SUMMATION QUERIES ............................................................................................ 67 FILTERS ......................................................................................................................... 69 REPORTS........................................................................................................................ 71 REPORT WIZARDS .................................................................................................... 73 CHART WIZARD ........................................................................................................ 75 VIEWING THE REPORT............................................................................................ 77 REPORT MODIFICATION......................................................................................... 79 CLOSING ACCESS ..................................................................................................... 85

Page 4

OBJECTIVES

By the end of this seminar, you will be able to: create and maintain an ACCESS table design a form develop a query create, format and print a report.

Access 2000 Level 1

GETTING STARTED

Page 2

Nancy Wallace

Microsoft Access 2000 Level 1

GETTING STARTED

NOTES:

Double click on your desk top icon or Click Start, Programs, Microsoft Access.

Create a New Database Click Blank Access Database Click OK Save in: - click the drop down arrow - click location to save database File name: type a file name for the database Click Create.

Nancy Wallace

Page 3

Access 2000 Level 1

GETTING STARTED

Page 4

Nancy Wallace

Microsoft Access 2000 Level 1

NOTES: Open an Existing Database OR Favorites Click Open an Existing Database Select More Files from list of files presented Select file location from Look In: or click a location icon on the left side of the Open Dialog box Select a database Click OK Click Open an Existing Database Select a file from list of files presented in the open window Click OK

To add a database to the Favorites folder: Click the Open icon Create a short cut to the database by selecting a file from the list appearing under the Look In: box Click Tools Click Add to favorites

Nancy Wallace

Page 5

Access 2000 Level 1

ACCESS DATABASE
THE ACCESS DATABASE WINDOW

Page 6

Nancy Wallace

Microsoft Access 2000 Level 1

ACCESS DATABASE: DEFINITIONS


NOTES: Relational Databases. ACCESS is a relational database management system. Relational databases allow you to organize your data into tables; each table focuses on a specific topic; the various tables can then be linked to each other for inquiry and reporting purposes. Database Components. Microsoft Access uses four objects to create a Database: tables queries forms reports.

Table

A table is the basic element of a Database and contains the data entered by users. Each row (or record) contains information about a particular item (e.g., an employee). The record is made up of several fields; each field contains one piece of information relating to the item (e.g., employee's name, address, phone, etc.). A query extracts selected data from a table (or another query) and presents it in spreadsheet format. A form is a graphical template based on a table (or query). It is used to enter new data into the database or display existing data. A report extracts selected data from a table (or query) and formats it for printing.

Query Form

Report

Nancy Wallace

Page 7

Access 2000 Level 1

DATABASE WINDOW COMPONENTS

Menu Bar Command Buttons

Object Tabs

Favorites

Page 8

Nancy Wallace

Microsoft Access 2000 Level 1

DATABASE WINDOW COMPONENTS


Menu Bar This toolbar contains commands and submenus. They will change depending on the functions you are currently performing.

NOTES:

Object Tabs

Allow you to see a list of all objects in that category: Tables, Queries, Forms, Reports, Macros, and Modules.

Command buttons Groups

Allow you to Open an existing database, modify the Design of an existing database or create a New database. A Group consists of shortcuts to the database objects that belong to it. You can keep related objects of different types together in a group. For example, you may group a Form together with its Subforms and the Tables and/or Queries that the Forms are based on. The Favorites folder stores shortcuts to frequently used file folders and databases.

Favorites

Nancy Wallace

Page 9

Access 2000 Level 1

TABLES

Viewing a Table.

Record (row)

Field (column)

Page 10

Nancy Wallace

Microsoft Access 2000 Level 1

TABLES

NOTES:

What is a Table? A table is a database object used to store, organize and view data. All other objects are based on the data stored in tables. Tables are comprised of: fields - represented by columns records - stored as rows.

Tables look like EXCEL worksheets.

Nancy Wallace

Page 11

Access 2000 Level 1

TABLE WIZARD

Page 12

Nancy Wallace

Microsoft Access 2000 Level 1

TABLE WIZARD
The Table Wizard provides step-by-step help in creating a table, selecting fields, assigning a primary key, and naming the table. Using Table Wizard From the Database window: Click Tables Tab and click New

NOTES:

New Table window - select Table Wizard - click OK Table Wizard window - select a category (business or personal) - select a Sample Table - click the sample field you want to include in your table and click the button to move each field to the Fields in my new table list click Next name the new table and choose a Primary key option click Next click Finish.

Enter data in the table.

Nancy Wallace

Page 13

Access 2000 Level 1

WORKING IN THE DATABASE WINDOW

Database Toolbar Record Selector Navigator

Scroll Bars

Page 14

Nancy Wallace

Microsoft Access 2000 Level 1

WORKING IN THE DATABASE WINDOW


NOTES: Open an Existing Table From the Database Window: Click Tables Tab Click a Table from the Tables List Click Open Database Toolbar Each button allows you to perform a different Access function; the buttons change depending on the function you are currently performing. Navigators A Record Indicator points to the current record. Navigator arrows indicate which record number is selected and the total number of records in the table.

- move to first record - move back one record - move forward one record - move to last record - move to new record - total number of records in the table.

Movement Keys Tab, Enter move you from field to field. Scroll bars (vertical, horizontal) move up and down rows, through pages of records, or across several columns. Page Up and Down move one page at a time. Ctrl/Home and Ctrl/End move to the top or bottom of the table.
Nancy Wallace Page 15

Access 2000 Level 1

CHANGE COLUMN APPEARANCE


Select a column with the down arrow:

Hide columns Freeze columns

Page 16

Nancy Wallace

Microsoft Access 2000 Level 1

CHANGE COLUMN APPEARANCE


Resize Hide and Show Position mouse cursor on the vertical line between column headings to display a cross Drag left or right or Double click on the vertical line to let Access choose the best column width. Place the mouse cursor in the heading of a column click. and

NOTES:

Select a Column Move

Click the mouse in the heading of a column. . When the white arrow cursor is displayed, hold down the left mouse button. A small white box appears. Drag this column to its new position.

Hide: Click cursor in any row of column to be hidden. Click Format. Click Hide Columns. Show: Click Format. Choose Unhide Columns. Click check box next to the column name to be shown. Click Close. Freeze: keeps selected columns on the left side of the screen when you scroll to the right to see those fields which are not in view. Position cursor in column to be frozen. Click Format. Click Freeze Columns. Note: the frozen columns are re-positioned to the left side of the screen. Unfreeze: Click Format. Click Unfreeze All Columns. Note: you may want to move the unfrozen columns to their original position.

Freeze and Unfreeze

Nancy Wallace

Page 17

Access 2000 Level 1

ENTER, VIEW AND MODIFY DATA

Undo

Sort

Find

MENU BAR

Replace

Page 18

Nancy Wallace

Microsoft Access 2000 Level 1

ENTERING DATA
Enter Data Type data and press Enter or Tab to move to the next cell.

NOTES:

VIEW DATA
Find Data

Click the Find icon to locate a particular field value in the table. The Find and Replace dialog box allows you to search for all or part of a field in one or many columns.

Sorting

Select a column and click the ascending or descending sort icon. The sort applies to the display; the physically stored data remains unchanged on the table.

MODIFY DATA
Edit Undo

Undo the last change by clicking Undo on the toolbar; you can undo the last saved record by selecting Undo Saved Record from the Edit Menu.

Esc (keyboard key) Undo all changes to this record as long as you are still in edit mode. Pencil on the left side of the record indicates edit mode (as opposed to view mode). Replace Data On the Edit Menu, click Replace. In the Find What box, type the value you want to find. In the Replace With box, type the value you want to replace it with.

Nancy Wallace

Page 19

Access 2000 Level 1

TABLE DESIGN
Design View

Data Normalization Primary Key

Smallest Components (Address)

Page 20

Nancy Wallace

Microsoft Access 2000 Level 1

TABLE DESIGN
NOTES: Tables are the heart of a database. Data can be organized into one or many tables depending on the complexity of an application. If tables are organized efficiently, query and report design will be straightforward. Design a Table Database window: Click Table Tab Click New Click Design View and OK. Categorize Your Data Each table should deal with one category of data and have a unique key to which all the other fields are related. SAMPLES: Table Name Customers Account Holdings Product List Bank Employees Description Customer List Customers Assets Prod ID / Description Empl# and Name Primary Key Customer ID Account # Product ID Employee ID

Normalize Your Data Data normalization increases the accuracy of your data and saves space on your database by eliminating duplicate information where it is not necessary. (In a relational database, there is always some duplication.) Extraction and sorting functions run efficiently when each data element is precisely defined. Eliminate redundancy data values should not be repeated in several records of a table and records should not have empty fields. Define smallest components break your data into distinct components; e.g., Last Name, First Name, Street, ZIP, Area Code, etc.

Choose a Primary Key A Primary Key is a field that uniquely identifies each record in the table; all data in the table should be related to that unique key.
Nancy Wallace Page 21

Access 2000 Level 1

DATA TYPE DEFINITIONS

Page 22

Nancy Wallace

Microsoft Access 2000 Level 1

DATA TYPE DEFINITIONS


Text any character (alpha, special characters, numbers) up to 255 in length numbers cannot be used for calculations any character (alpha, special characters, numbers) up to 65,000 in length numbers cannot be used for calculations field cannot be sorted or indexed numeric data to be used for mathematical calculations not to be used for currency fields FieldSize property further defines its function and size must be a valid date/time entry at entry time format property determines display format prevents rounding off during calculations 15 digits to the left of the decimal point and 4 to the right are available ACCESS automatically creates an incrementing unique number controlled by ACCESS cannot repeat

NOTES:

Memo

Number

Date/ time Currency

Auto Number

Note: since an Autonumber field value is unique within each table, it can be used as a Primary key if none of the other application fields contain unique values. Yes/No logical indicator (one of two values) on/off, true/false, yes/no Yes value is yes, on, true or -1; No value is no, off, false or 0 used to store Word or Excel documents can also store pictures, sound and graphics created by other programs

OLE object

Nancy Wallace

Page 23

Access 2000 Level 1

ADVANCED DATA TYPES


Menu bar / Insert / Hyperlink

Hyperlink Wizard

Hyperlink in Datasheet view

Page 24

Nancy Wallace

Microsoft Access 2000 Level 1

ADVANCED DATA TYPES


Hyperlink Creates a field that allows you to jump (move) to other screens: jump to objects in the same or another database jump to documents created with Word, Excel or Power Point jump to an Internet or Intranet home page. In Table Design view, enter a field name and set the data type to Hyperlink.

NOTES:

Create Hyperlink field Hyperlink format

The Hyperlink field can contain 4 parts, separated by the number sign (#); only address is required: display text#address#subaddress#screen tip

Hyperlink wizard

In Table Datasheet view: click the Hyperlink field click Insert in the Menu bar click Hyperlink. Enter text and address segments in the Hyperlink window: display text the text that you see in the field or control address path to the target document (Web Page URL or Word document or Excel spreadsheet or Access database). subaddress a location within the file (e.g., an object in a database) screen tip text that appears when you point to the hyperlink on a datasheet or form.

Examples

C:\CorpEd\Resumes\TechnicalFormat.doc##Sample of a technical resume #http://www.microsoft.com#sample# #c:\CorpEd\Excel\Spreadsheets\budget.xls#sheet1!A2

Nancy Wallace

Page 25

Access 2000 Level 1

ADVANCED DATA TYPES


Modifying a Hyperlink

Page 26

Nancy Wallace

Microsoft Access 2000 Level 1

ADVANCED DATA TYPES, continued


NOTES: Modify a Hyperlink In Datasheet view: Right click on the Hyperlink field to display a short cut menu Click Hyperlink to display the Hyperlink Wizard window Click Edit Hyperlink Follow prompts. Note: Left clicking on the Hyperlink, opens the target object.

Delete a Hyperlink

In Datasheet view: Right click on the Hyperlink field to display a short cut menu Click Hyperlink to display the Hyperlink Wizard window Click Remove Hyperlink.

Nancy Wallace

Page 27

Access 2000 Level 1

ADVANCED DATA TYPES, continued


Design view:

Datasheet view:

Page 28

Nancy Wallace

Microsoft Access 2000 Level 1

ADVANCED DATA TYPES, continued


NOTES: Lookup Wizard Creates a field that looks up data from another table (or query) in Design View. In datasheet view, at data entry time, the operator will click on a down arrow and be presented with a list of valid choices for the Lookup field. In design view: Click the field to be used as the key for the Lookup. In the DataType column, click the drop down list arrow and click Lookup Wizard. Click the option "I want the lookup column to look up the values in a table or query". Click Next and follow the wizard directions. The new field will take the DataType and field size from the properties of the field in the Lookup table. Click the Lookup tab in the Field Properties section of the Design window to see the Lookup parameters.

Nancy Wallace

Page 29

Access 2000 Level 1

FIELD PROPERTIES

Page 30

Nancy Wallace

Microsoft Access 2000 Level 1

FIELD PROPERTIES
The properties for each field in your table are displayed in the Field Properties pane in Design View. ACCESS assigns default values for all properties that you can change. Click a field in the Design view window Press F6 to jump to the related Field Properties display.

NOTES:

Field Size

Sets a maximum size for data; varies according to Data Type: text is 255 characters number - byte (255) - integer (+/- 32,000, no fractions) - long integer (+/- 2 billion, no fractions) - single (floating point, decimal precision 7) - double floating point, (decimal precision 15)

Format

Date/time, currency, and numbers have several display formats available. Click on the down-arrow to the right of the format cell to see options.

Input Mask

Controls the way data is entered; frequently used for telephone numbers, postal codes, SSN #s, date/time fields. ACCESS offers a Wizard for text and date/time data types.

Caption

You specify text for the label attached to a field; will be used as the column heading when displaying tables, queries and reports. The default value is FieldName.

Continued next page

Nancy Wallace

Page 31

Access 2000 Level 1

FIELD PROPERTIES, continued

Page 32

Nancy Wallace

Microsoft Access 2000 Level 1

FIELD PROPERTIES, continued


NOTES: Default Value Validation Rule Validation Text Required Allow Zero Length Indexed Specifies a value that will be automatically entered when you create a new record. Controls the values to be entered into a field; e.g., < 1/1/2000 The message that will be displayed when the rule is broken; e.g., Cannot enter dates later than 12/31/1999. Click Yes to indicate that data must be entered into the field. Applies to text, memo and Hyperlink only. Entering a zero length string () means, I know there is no value for this field; used with Required property. An index helps ACCESS find and sort records faster; use on fields you search frequently, or fields you intend to join in queries. Indexes can be based on a single field or multiple fields; the field value does not have to be unique; e.g., LastName. Click the Indexed property in Field Properties. Click the drop down list arrow for options. Click an option: - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing.

Nancy Wallace

Page 33

Access 2000 Level 1

TABLE RELATIONSHIPS
View related tables in Datasheet view. Order Details

Orders

Subdatasheet

Fields from distinct tables can be merged on queries and reports

Page 34

Nancy Wallace

Microsoft Access 2000 Level 1

TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View: From Database Window, click a table and click Open Click a second table, click Open Click Window on Menu Action Bar Click Tile Vertically Subdatasheet Access 2000 has a new feature which allows you to show a related table by clicking on the small + in each row in datasheet view. The related table will be displayed as a Subdatasheet (and the small + is now a -).

NOTES:

Each Table has a Unique Focus Each table focuses on one topic; the topic is usually defined by the Primary Key e.g., Order ID. Tables are related by common fields For Query and Reporting purposes, tables can be joined so that all detail information can be displayed (see Orders and Order Details Report on opposite page). Example (see opposite page) The Orders Table lists: Order numbers Customer numbers. The Order Detail table lists: Order numbers Product numbers.

Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table.

Nancy Wallace

Page 35

Access 2000 Level 1

HELP
Ask the Office Assistant for HELP on specific Field Properties.

Page 36

Nancy Wallace

Microsoft Access 2000 Level 1

NOTES:

HELP FROM OFFICE ASSISTANT


From Design View If the Office Assistant is not visible on your Access window: click the icon OR click Help in the Menu bar click Show the Office Assistant.

Office Assistant

To get assistance while working on your database click the Office Assistant type in a question or phrase e.g., Validation Rules click Search Access will display a list of related topics for you to choose from. click one of the suggested topics or enter another freeform topic e.g., examples of date click Search. To remove the Office Assistant from your screen: right click the Office Assistant click Hide OR click Help in the Menu bar click Hide the Office Assistant.

The following topics may be helpful when designing a table: Examples of input masks. Examples of default values in fields. Format property. Examples of field validation rules. Examples of expressions. Examples of combining text values.

Nancy Wallace

Page 37

Access 2000 Level 1

HELP FROM THE WEB

Page 38

Nancy Wallace

Microsoft Access 2000 Level 1

HELP FROM THE WEB


NOTES: Click Help in the Menu Bar. Click Office on the Web to access the Internet and open the Microsoft Office Update web page. Click: - Access Favorites (click on a topic) - Under Access, click "Assistance".

Nancy Wallace

Page 39

Access 2000 Level 1

HELP FROM THE MENU BAR

Page 40

Nancy Wallace

Microsoft Access 2000 Level 1

HELP FROM THE MENU BAR


NOTES: Click Help in the Menu Bar. Click Microsoft Access Help on the Help menu. Click the Index tab, type the word(s) you want Help on; (e.g., input mask) or click on an item in the keywords list Click on a topic in the Choose a topic window

Note: In order to use Help from the Help menu, you must first turn off the Office Assistant: To turn off the Office Assistant: click Office Assistant click Options remove a from Use Office Assistant box

Nancy Wallace

Page 41

Access 2000 Level 1

FORMS
Design View

Unbound Controls Bound Controls

Form View

Header Detail

Footer

Page 42

Nancy Wallace

Microsoft Access 2000 Level 1

FORMS
What is a Form? A Form is a database object used for data entry, update and display. A Form displays only one Table record at a time whereas a Table Datasheet shows multiple records at one time. You can design a user-friendly template (form) for data entry and update, which focuses on one specific record, or one set of joined records from multiple tables. Sections There are three Form sections: Form header Detail Form footer Controls Each section contains controls; controls are objects on a form that display data, perform actions or decorate the form. They are created through icons on the toolbox in Design View. Controls may be bound, unbound or calculated: bound controls are tied to a field in an underlying table or query. unbound controls do not have a data source; they display static information (labels, headings) or pictures. calculated controls use expressions as the source of data. Appears at the top of the page. This section displays a title for a form, instructions for using it and command buttons that open related forms or carry out other tasks. Displays records. You can display one or many records on a screen. Appears at the bottom of every page. This section is used to display instructions, command buttons, or unbound controls to accept input.

NOTES:

Nancy Wallace

Page 43

Access 2000 Level 1

SWITCHBOARD MANAGER

If Access asks you to create a valid Switchboard, click Yes.

Click New on the Switchboard Manager Dialog screen.

Enter a name for Switchboard.

Page 44

Nancy Wallace

Microsoft Access 2000 Level 1

NOTES:

SWITCHBOARD MANAGER
A Switchboard is a menu that makes it easy to navigate between forms and reports in your database. You can create a Switchboard with the Switchboard Manager tool. Warning Switchboard Manager is not like other Access Wizards where you create an object and then customize it in design view. The Switchboard is designed to be used exactly as it is. Access warns us that the application may no longer work if you modify the form in design view. If you are not satisfied with the appearance or function of the Switchboard, you can delete it and create your own menu form using the Command Button tool to define your actions and objects. Click Tools, point to Database Utilities, click Switchboard Manager. If Access asks if you want to create a Switchboard, respond Yes. In the Switchboard Manager dialog box, click New... In the Create New box, enter a name for the new Switchboard Page. Click OK.

Create a Switchboard

Nancy Wallace

Page 45

Access 2000 Level 1

Select your Switchboard from the list of Switchboard pages.

Add new buttons to your Switchboard.

Define each command button.

Page 46

Nancy Wallace

Microsoft Access 2000 Level 1

SWITCHBOARD MANAGER, continued Add Command Buttons In the Switchboard Manager dialog box, click your switchboard Click Edit Add command buttons to the Switchboard: - In the Edit Switchboard Page dialog box, click New to add a new button - In the Edit Switchboard item dialog box, type the text for the first Switchboard button Click the appropriate Command Click the object name, if prompted. - Click OK. Repeat the above steps for each Button you want to appear on the Switchboard form. Click Close when all the buttons have been defined. NOTES:

Nancy Wallace

Page 47

Access 2000 Level 1

Open the new Switchboard.

Page 48

Nancy Wallace

Microsoft Access 2000 Level 1

NOTES: SWITCHBOARD MANAGER, continued Open the Switchboard To view the new Switchboard Form, open the Database window: click on Forms click on Switchboard. Note: If your Switchboard does not open or if it opens but says, there are no items for this switchboard, close your database and re-open it. Add or Delete a button To modify your Switchboard: Click Tools, point to Database Utilities, and click Switchboard Manager select your Switchboard from the list of Switchboard pages click on Edit to add a new button, click New and follow prompts to remove a button, select an existing button and click Delete. To delete the Switchboard: delete the Switchboard Items table delete the Switchboard form.

Delete the Switchboard

Nancy Wallace

Page 49

Access 2000 Level 1

FORM WIZARD

New Object: AutoForm

Form Wizard

Page 50

Nancy Wallace

Microsoft Access 2000 Level 1

FORM WIZARD
The quickest way to create a Form is to use the AutoForm Wizard. Even if you want a customized Form, you may want to start with AutoForm and then modify it. Using Form Wizard From Database window: Click Table Tab and select a Table Click Open Click New Object: AutoForm icon in Table Datasheet Toolbar

NOTES:

OR From Database window: Form Wizard Menu Click Forms Tab Click New Click Form Wizard Select a Table or Query from the drop-down list (OK) Follow prompts: - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish).

Nancy Wallace

Page 51

Access 2000 Level 1

FORM MODIFICATION TOOLBARS

Form Design

Formatting (Form / Report)

Toolbox

Page 52

Nancy Wallace

Microsoft Access 2000 Level 1

FORM MODIFICATION
Modify a Form for the following reasons: Design View data fields need to be relocated in order to fit on one screen font size should be enlarged for easy reading cosmetic purposes, e.g., adding a logo or enhancing appearance with color.

NOTES:

A form has three sections: Form Header, Detail, Form Footer.

Toolbars

Display three toolbars to modify a Form: Form Design, Formatting Form/Report and Toolbox To display toolbars: Click the Forms Tab Click Design Click View in the Menu bar Click toolbars Click the desired Toolbar.

FORMATTING TOOLBAR ICONS To activate these icons: from Design View, click on the background section of the Form or a particular control on the form to select it for modification. Palettes There are 3 Color palettes available in the Formatting toolbar: Fill/Back color - paint background colors in forms, labels and text boxes Font/Fore Color - change text color Line/Border Color - change line color, e.g., borderlines.

Nancy Wallace

Page 53

Access 2000 Level 1

FORM MODIFICATION, continued TOOLBARS

Form Design

Formatting (Form / Report)

Toolbox

Page 54

Nancy Wallace

Microsoft Access 2000 Level 1

FORM MODIFICATION, continued


NOTES: Line/Border Width Adjusts the thickness of lines.

Special Effects

Applies to label boxes and text boxes; boxes can be flat, raised, sunken, etched, shadowed, chiseled.

Text formatting

Standard font, intensity and alignment tools; apply these to text in label and text boxes.

TOOLBOX TOOLBAR ICONS Add label Add a label to the form: click the icon click the area where you want to insert the box hold down the mouse button and draw (drag) a square big enough to hold the box release the mouse button type text. Add an unbound picture to the form: click the icon click the area where you want to insert the object hold down the mouse button and draw a square big enough to store the picture release the mouse button (Insert Object window appears) choose from a list of object types such as Clip Art Gallery, Paintbrush picture, etc. Size Mode Property: default is Clip; you can change to Stretch. Right click on picture Left click on Properties - Clip If the picture cannot fit into the space allowed for it, it is clipped to fit. - Stretch The picture is sized to fit the space allowed, keeping its height/width ratio.
Page 55

Unbound object frame

Object frame properties

Nancy Wallace

Access 2000 Level 1

QUERY WIZARD

Find Duplicates

Page 56

Nancy Wallace

Microsoft Access 2000 Level 1

QUERIES
NOTES: What is a Query? Queries ask questions about your database. You can design a query manually, specifying all of the tables and fields you wish to display on your screen, or you can use a Query Wizard to create simple displays in predefined formats.

QUERY WIZARD
Wizard Options Access 2000 provides several query formats in its Wizard library: simple - looks like the Table datasheet view crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column find duplicates lists the records which have duplicate values in any specified field find unmatched compares two tables and identifies records, which do not have a match in a related table. Using Query Wizard From Database window: Click Query Tab Click New Select Query type from list (OK) Follow prompts: - select Tables / Queries (Next) - select Fields (Next) - create a Title - click Finish.

Nancy Wallace

Page 57

Access 2000 Level 1

QUERIES
DESIGN VIEW

Sort sequence

Selection criteria

Page 58

Nancy Wallace

Microsoft Access 2000 Level 1

NOTES:

SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Recordset containing all the records that qualify. You can view this Recordset on your screen or use it as the source for a Report. When designing a query manually you can specify: table(s) from which you want to extract data fields you want displayed calculations you want performed on those displayed fields ranges of data sort sequences for various fields. Query Design: click the Query Tab click New click Design View click OK. Choose Source for Query Fields: The Query Design window and a pop-up Show Table window listing all the tables and queries in your database are displayed. As you choose a table and/or query for your source, the selected object will be placed into the top pane of the Query window. Click an object in the Show Table (table or query) Click Add Repeat these two steps for each object that is needed Click Close. Select Fields: Double click each field in the source object that you want to include in your query. The selected fields will be placed into the Field portion of the Design grid. OR Drag and drop each field from the source object into a cell in the Design grid. Specify selection criteria (see next page) and/or sort sequence for each of the selected fields.

Nancy Wallace

Page 59

Access 2000 Level 1

CRITERIA EXPRESSIONS

Selection criteria

Page 60

Nancy Wallace

Microsoft Access 2000 Level 1

NOTES:

COMMON EXPRESSIONS
Criteria Expression Shows records where

France Not France In (France, Germany, Italy) <M >=M 100 <=20 Date() Now >=#1/1/98# Between #1/1/98#AND#12/31/98# 2/*/* Null Is Not Null

Value is France Value is not France Value is France, Germany, or Italy Value begins with letters A-L Value begins with letters M-Z Numeric value is 100 Numeric value is less than or equal to 20 Date is todays date Current date and time Date is on or after 1/1/98 Date is in the year 1998 Date is in the month of February The field does not contain a value The field contains a value

Note: when using a date in a calculation, surround it with number signs (#).

Nancy Wallace

Page 61

Access 2000 Level 1

EXPRESSION FOR FIELD ROW

Resulting Query

Name fields have been concatenated into one field; address fields have been concatenated into one field.

Page 62

Nancy Wallace

Microsoft Access 2000 Level 1

EXPRESSIONS FOR FIELD ROW


Field Row cells can contain Field names from Tables or Expressions. Expressions might be concatenations of related fields (e.g., names, addresses) or calculations. To concatenate means to join several fields of text strings into one text string (see example on facing page). To code an Expression: click an empty field cell click the build button to open Expression Builder. Expression Builder provides a working space for coding the Expression and also provides access to the Table Field Names and Common Expressions. Expression Examples Concatenation Table Field(Value): Names Expression: Result: Address Table Field(Value):

NOTES:

LastName(Smith) FirstName(Ruth) Name:LastName& , &FirstName Name: Smith, Ruth Street(101 E. 34th St.) City(New York) State(NY) ZIP(10016)

Expression: Addr: Street&, &City&, &State& &ZIP Result: Addr: 101 E. 34th St., New York, NY 10016 Calculations Table Field(Value): DateLastClass(06/04/1998)

Expression: DaysUntilY2K: #01/01/2000#-DateLastClass Result: DaysUntilY2K: 576

Nancy Wallace

Page 63

Access 2000 Level 1

PROPERTIES
Right click on cell for drop down menu.

Click

Page 64

Nancy Wallace

Microsoft Access 2000 Level 1

PROPERTIES
The display characteristics of a field are called Properties; e.g., font, decimal places, date format. Use the Properties Box to modify the display characteristics of any field or calculation. Right click a Field or Calculation cell. Left click on Properties. A Field Properties box will appear in your design window. Select (and Modify) the appropriate Field Property.

NOTES:

Note:

If you see Query Properties rather than Field Properties, be sure the SHOW box is checked for the selected field; only SHOW fields have properties.

Nancy Wallace

Page 65

Access 2000 Level 1

SUMMATION QUERIES
Click on Totals icon

Totals row

RUN

Page 66

Nancy Wallace

Microsoft Access 2000 Level 1

SUMMATION QUERIES
NOTES: Queries provide either detail information or summation information about the data in your Tables. For example (refer to sample on opposite page): detail display information from an individual table row (payee, check number, amount, etc.) summary show a count of the number of checks written to a particular Payee (PayTo name and Count of Checks, showing Check Number for the First check only). To obtain totals or grouped by category information, you must add the TOTALS row to your Query design grid: Click the Totals button on the toolbar. The Totals Row is displayed underneath the Table row on your design grid and the phrase Group By appears in the Total cell for each Field. You have several options for calculations: Sum, Average, Count, Last, etc.

In the example on the opposite page, Access will group expenses together by Pay To, show the First check number paid in each group, and also count the number of checks written in each Pay To category.

RUN the Query. Note: You can use the same field multiple times in the design grid.

Nancy Wallace

Page 67

Access 2000 Level 1

FILTERS: DEFINITION
Filter by Selection Based on a Table: Select value to be used as criterion.

Filtered data

Filter by Form Based on a Query:

Enter selection criteria

Filtered data

Page 68

Nancy Wallace

Microsoft Access 2000 Level 1

FILTERS
What is a Filter? Filters act like Queries; they allow you to select and view data records quickly. A filter differs from a query in the following ways: a) entire records are reviewed, not just specified fields b) multiple tables cannot be accessed in a filter c) calculations cannot be performed in a filter d) the filter tool can be selected from table datasheet view, query view or form view.

NOTES:

Applying a Filter There are two ways to filter: Filter by Selection specify one criterion by clicking on a value you are looking for within a datasheet or form: open a table click on a specific value in any field on the table click on the Filter by Selection icon in the toolbar Access will display all rows having the same value as the field you selected.

Filter by Form specify both criteria and conditions in a blank version of your table. open a table click on the Filter by Form icon in the toolbar key in selection values or conditions in any field (s) OR click the drop down list arrow in any field and click a specific value in the list Access will display all rows having the same value(s).
Page 69

Nancy Wallace

Access 2000 Level 1

REPORTS
Design View

Unbound Controls Bound Controls Calculation

Print Preview Headers

Detail

Footers

Page 70

Nancy Wallace

Microsoft Access 2000 Level 1

REPORTS
What is a Report? A Report is used to display and print selected information from a Table or Query. Reports can display detail information as well as sub-totals and grand totals; queries can display either details or totals. A Report has several sections: Report header Appears once at the beginning of a report; it is printed on the first page, before the page header. Controls Each section contains controls; controls are objects on a form that display data, perform actions or decorate the form; they are accessible through the toolbox in Design View. Controls may be bound, unbound or calculated: bound controls are tied to a field in an underlying table or query unbound controls do not have a data source; they display fixed data (information, lines, pictures) calculated controls use expressions as the source of data. Report footer Appears once at the end of the report; it is printed on the last page, before the page footer. Page header Appears at the top of every page. Page footer Appears at the bottom of every page. Group header Appears at the beginning of a new group of records. Group footer Appears at the end of a group of records. Detail Contains the main body of a reports data; controls in this section repeat for each record of the database.

NOTES:

Nancy Wallace

Page 71

Access 2000 Level 1

REPORT WIZARDS

Page 72

Nancy Wallace

Microsoft Access 2000 Level 1

REPORT WIZARDS
NOTES: The quickest way to create a report is to use the AutoReport Wizard. Even if you want a customized Report, you may want to start with one of the Report Wizard formats and then modify the layout.

Using the Report Wizard From Database window: Click Reports Tab Click New Select Report Wizard from list Follow prompts: - choose a Table or Query - select fields - select grouping* levels - specify sorting sequence - select layout and orientation - click Finish. (OK) (OK) (Next) (Next) (Next) (Next)

* Grouping levels: allow you to keep together data belonging to a specific group; e.g., all customers with the same Zip code.

Nancy Wallace

Page 73

Access 2000 Level 1

CHART WIZARD

Page 74

Nancy Wallace

Microsoft Access 2000 Level 1

CHART WIZARD
NOTES: Charts and graphs can be created using Report Wizard. Access offers a variety of chart styles: bar charts pie charts line charts area charts 3-D charts.

Using the Chart Wizard From Database window: Click Reports Tab Click New Select Chart Wizard from list Follow prompts: - choose a Table or Query - select fields - select type of chart - specify layout (e.g., x and y axis fields) - specify a title for the chart (OK) (OK) (Next) (Next) (Next) (Finish).

Nancy Wallace

Page 75

Access 2000 Level 1

VIEWING THE REPORT

View

Zoom

Page 76

Nancy Wallace

Microsoft Access 2000 Level 1

NOTES:

VIEWING THE REPORT

Preview the report in design view: Click down arrow on the View icon Print Preview shows the entire report; you must use the scroll bars to view left and right and page down. Layout Preview shows one sample page, displaying the various sections. From Report View (or Print Preview), you can use the Page buttons to see one, two or multiple pages at once; the Zoom button allows you to enlarge and view any section in order to read it.

Print Report

To print a Report: click the Reports tab click the report you want to print click the Printer icon Note: Always preview your Report before printing.

Nancy Wallace

Page 77

Access 2000 Level 1

REPORT MODIFICATION DESIGN VIEW

Page 78

Nancy Wallace

Microsoft Access 2000 Level 1

REPORT MODIFICATION
Reports can be modified for the following reasons: to improve appearance and readability by modifying font size, borders, field spacing and field alignment to add a group footer for sub-totaling capability to add a report footer for showing grand totals to add a department or company logo to the report header or page header sections.

NOTES:

MODIFICATION TOOLS Design View From database window: Click Reports Tab Select a Report from the list Click Design Report structure includes: report, page, group headers report, page, group footers detail section. Note: The number of header and footer sections vary, depending on how you defined your requirements to the Wizard.

Nancy Wallace

Page 79

Access 2000 Level 1

REPORT MODIFICATION, continued

TOOLBARS

Report Design

Formatting Form / Report

Toolbox

Page 80

Nancy Wallace

Microsoft Access 2000 Level 1

REPORT MODIFICATION, continued


NOTES: TOOLBARS In order to modify a report, display these toolbars: Report Design Formatting Form/Report Toolbox.

REPORT DESIGN TOOLBAR ICONS Sorting & Grouping The Sorting and Grouping window will show you the groupings and sort sequences that are in effect. Modify Group Properties parameters to add or remove headers or footers.

FORMATTING (FORM/REPORT) TOOLBAR ICONS Line/Border Width Adjusts the thickness of lines and/or borders.

Text formatting

Standard font, intensity and alignment tools; apply these to text in labels and text boxes.

Nancy Wallace

Page 81

Access 2000 Level 1

REPORT MODIFICATION, continued

TOOLBARS

Report Design

Formatting (Form / Report)

Toolbox

Page 82

Nancy Wallace

Microsoft Access 2000 Level 1

REPORT MODIFICATION, continued


TOOLBOX TOOLBAR ICONS A label container is used to hold fixed information Add label (e.g., titles, captions). To add a label container to the report: click the label button click the area where you want to insert the box hold down the mouse button and draw a square big enough to hold the label release the mouse button type text. Add text box A text box container holds variable data such as fields from table records or calculations. To add a text box container to the report: click the text box button click the area where you want to insert the box hold down the left mouse button and draw a square big enough to hold the text box release the mouse button. Examples of text box phrases: =sum(fieldname) =count(fieldname) =Date(). Unbound object frame Add an unbound picture to the Report: click the unbound object frame button click the area where you want to insert the object hold down the mouse button and draw a square big enough to store the picture release the mouse button and the Insert Object window appears; choose from a list of object types such as Clip Art Gallery, Paintbrush picture, etc. Size Mode Property: default is Clip; you can change to Stretch. Clip If the picture cannot fit into the space allowed for it, it is clipped to fit. Stretch The picture is sized to fit the space allowed, keeping its height/width ratio. NOTES:

Object frame properties

Nancy Wallace

Page 83

Access 2000 Level 1

CLOSING ACCESS
Object Window Close Button

Access Application Close Button

Page 84

Nancy Wallace

Microsoft Access 2000 Level 1

CLOSING ACCESS
NOTES: Close Click Close icon for the object. Note: if you are in design view, you will be asked if you want to save the design changes to the object. If you are in object view, you will be asked if you want to save the layout changes to the object. Changed data was saved as you moved to each new record. Click Close icon for the database. Click Close icon for the application.

Nancy Wallace

Page 85

Access 2000 Level 1

Page 86

Nancy Wallace

Microsoft Access 2000 Level 1

INDEX Auto, 23 Calculations, 63 Caption, 31 Concatenation, 63 Control Keys, 15 Create a New Database, 3 Criteria expressions, 61 Currency, 23 Date/, 23 Edit Undo, 19 EXPRESSIONS FOR FIELD ROW, 63 Favorites, 5, 9 Field Size, 31 FILTERS, 69 Find Data, 19 FORM WIZARD, 51 Format, 31 Forms Add label, 55 Controls, 43 Line/Border, 55 Modification, 53 Sections, 43 Unbound object frame, 55 Freeze and Unfreeze, 17 Groups, 9 Hyperlink, 25 Indexe, 33 Input, 31 Lookup, 29 Memo, 23 Menu Bar, 9 Navigators, 15 Normalize Your Data, 21 Number, 23 Object Tabs, 9 OLE, 23 Open an Existing Database, 5 Primary Key, 21 Queries Properties, 65 Query Wizard, 57 Run the query, 67 Selection queries, 59 Summation queries, 67 QUERIES, 57 Record, 14 Relational Databases, 7 Replace Data, 19 Required, 33 Resize, 17 Show and Hide, 17 Sorting, 19 Subdatasheet, 35 Switchboard Manager, 45 Add command buttons, 47 Open the Switchboard, 49 TABLE WIZARD, 12 TABLES, 11 Text, 23 Toolbars Formatting Toolbar, 53 Toolbox, 55 Validation, 33 Yes/No, 23

Nancy Wallace

Page 87

S-ar putea să vă placă și