1. Trang chủ
  2. » Ngoại Ngữ

BarCharts quickstudy access 2007

6 334 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 6
Dung lượng 3,49 MB

Nội dung

by simply dragging and dropping; Design View is available for advanced functionality, if needed • Calendar Icon automatically appears next to any field containing date values; pressing i

Trang 1

1 Office Button: Replaces the File menu in previous versions of Access;

provides options to work with the database (EX: Save, Close, Print)

2 Quick Access Toolbar: Puts commonly used commands on a permanently

visible toolbar; fully customizable

3 Ribbon: The new User Interface (UI) for most Office 2007 products,

replacing traditional menus; used to work in the database (EX: formatting text)

4 Title Bar: The Title Bar includes the name of the database (in this case,

Northwind 2007) and the database format used (in this case, Access 2007)

5 Close: To close the currently displayed database, click this icon; if anything in

the database needs to be saved, a window will be displayed asking whether or

not to save the object(s) before closing

6 Help: Provides quick and easy access to the Help system

7 Document Tabs: Displays open windows as tabs in this area; click on the tab

to display that window; icon before object name denotes the type

8 Shutter Bar Open/Close Button: Expands or collapses the Navigation

Pane

9 Navigation Pane: When a database is open, the Navigation Pane is

displayed in this area of the window; it provides quick access to the tables, queries, forms, reports, macros and modules that are defined within a database

10 Expand/Collapse Object Type: Expands (as shown here) or collapses

(to a single bar) selected object type

11 Status Bar: The current status of Access 2007 is displayed here; the status

will often be “Ready,” whereas instructions and other information may appear in this area in other views

12 Views: These icons in the Status Bar provide the ability to quickly change

the display view; buttons represent the following view types (left to right):

Form, Layout and Design; buttons vary with selected object

pg 1 Main Window

pg 2 New Features, New User Interface (UI)—(The Ribbon, Quick Access Toolbar, Getting Help,

Contextual Tools, Galleries, Key Tips & Keyboard Navigation, Status Bar, Super Tooltips, Dialog

Boxes & Dialog Box Launchers)

pg 3 Database File Formats, Access 2007 Terminology, Record Navigation Icons, Database Objects,

Office Button

pg 4 Office Button continued, Undo, Redo & Save—

Quick Access Toolbar, Home Tab

pg 5 Home Tab continued, Creating Tables, Table Tools,

Creating Queries, Common Keyboard Shortcuts

pg 6 Data Types, Common Field Properties, Primary

Keys

6

11

7 4

Microsoft ®

2

12

8

9

10

Microsoft ®

to get more free charts visit us

Trang 2

Access 2007 offers many new features over Access 2003; some of the new and

improved features (those in redare described in greater detail in this guide) are:

• New authoring tool allows preview of report layout while report is being

designed

Library of ready-made applications comes withAccess, and more can be

downloaded from Office Online seamlessly; designed to be used

immediately, though they can be customized if needed

• Data can be pasted from Excel and contacts can be imported from Outlook

• Forms can be used to collect information via email—Access can create a

form, email it to contacts in Outlook, have them fill it in and email it back,

and then Access can add the information into the database without the user

needing to retype the data

• Data modifications can be audited and deleted data can be undeleted when

Access is used with SharePoint 3.0 (part of the Office family of products that

runs on a server)

• Each object that is opened opens as a new Tabbed Document across the top

of the window

AutoFiltermakes it simple to filter any field for the data desired by checking

boxes of desired data (for text), specifying desired date data in English (EX:

“last month”), etc., as well as specifying sort direction, etc

• Layout View makes it very simple for anyone to create a form, report, etc by

simply dragging and dropping; Design View is available for advanced

functionality, if needed

• Calendar Icon automatically appears next to any field containing date values;

pressing it brings up a calendar so a date can be selected graphically

Rich Text(formatted, not plain text) can be entered in text and memo fields

Create Tab (on Ribbon) makes it simple to create new objects (EX: tables,

forms, macros), and great results are automatically generated when an

existing object is opened and a new object is created based on it (EX: creating

a form or report based on an open table)

• Fields can be multivalued (more than 1 value stored in the field), instead of

needing to create a linked table

• The Navigation Panemakes it simple to view all objects in any way desired;

it replaces the “Main” Window in previous versions of Access and can be

minimized, if desired

The new User Interface (UI) is the most striking feature of Access 2007; it came

about as the program has gotten more and more complex with more and more

options; this section reviews the changes in each section and is designed to help

you intuitively know where to look for the options you want (and along the way,

discover some things you never knew existed!)

New User Interface (UI)

Super Tooltips

The Quick Access Toolbar places common commands on the screen at all times,

no matter which tab in the Ribbon is displayed; these are common icons that can

always be used, such as Save and Undo, but any button can be added to it by

simply right-clicking on the button to add to the toolbar and selecting Add to

Quick Access Toolbar

Quick Access Toolbar

Keyboard Shortcuts that were available in Access 2003 work in the same way in Access 2007 [see Help for a list of them by looking under Accessibility Options]; to make selections from the Ribbon, press ALT and the shortcuts will appear, first to select the appropriate tab, then the option on the tab (ALT does

not need to be held down), as shown here

One of the new features of the Ribbon is the ability to show new tabs based on

the object currently being used; in the example shown here, the cursor is in a

datasheet (displays table data), so a new tab is shown—Datasheet; notice that Table Tools is shown above this tab, denoting that the toolbar is used with tables; also notice that the tab and the Table Tools text are in yellow, whereas the

standard tab color is white, making it easy visually to see that they are contextual tools (other tabs may appear in different colors)

Contextual Tools

Access offers an extensive Help system that can be displayed by clicking the

on the right side of the Ribbon; alternatively, you can get Help by pressing F1

Getting Help

The Ribbon replaces all the menus that were part of every Windows program; it

is designed to put the tasks and options you need at your fingertips and to show

you those that are only applicable when a particular kind of object is being

worked with; the parts of the Ribbon are as follows:

1 Tab: Groups tasks into areas of functionality; Home has the most common

options in one place

2 Group: Breaks the ribbon tab down into related areas of functionality, such

as formatting characters and filtering/sorting records

It is not optimized for any screen resolution and will adapt its contents

automatically; supports the traditional button, as well as Galleries [see

Galleries] and can launch dialog boxes if they are required

The Ribbon

Microsoft ®

1

2

Key Tips & Keyboard Navigation

Galleries are different from standard options,

in that they show the results of what is selected instead of how to make those results appear (EX: colors, borders, shading, etc.), making it simple to apply a coordinated look to an object; however, the individual elements can be formatted to override the style, if desired

There are 2 types of styles—In-Ribbon and

Dropdown; Access primarily uses dropdown;

the example here is the AutoFormat on the Arrange tab in Report Design View; dropdown galleries are displayed by clicking

the arrow (either or )

Galleries

The Status Bar can be configured to display as many or as few details as desired

about the current database; to change what is displayed, simply right-click on the status bar and check or uncheck the options desired

1 Status/Prompt: Status of the program or prompt for what the user can/should

do (in this case, double-click the selected item to get the details on that item)

2 Num Lock Indicator: Num Lock appears if it is on, but is not display

e

Microsoft ®

Microsoft ®

Microsoft ®

Microsoft ®

Super Tooltips are an enhanced version of

tooltips that have been available for years in

previous versions of Access; in the past, they

simply provided the name of the tool that was pointed at (and, in some cases, this is still true

with Access 2007); however, in Access 2007,

they often also provide descriptions (as

shown here); while the tip is displayed, pressing F1 will open Help on the subject for

those tips that state that as well (usually for more advanced functionality)

Dialog Boxes still exist in Access 2007, but they are primarily to provide access

to advanced functionality; for example, Gridlines is on the Home ribbon, but the line style for them is not; to select the line style, the Datasheet Formatting dialog box must be used by opening the Font dialog box launcher; to open any dialog box,

simple click on the Dialog Box Launcher icon at the end of a Group name

Status Bar

Dialog Boxes & Dialog Box Launchers

Microsoft ®

to get more free charts visit us

Trang 3

Access 2007 has several brand-new file formats; Access can still read and write

databases created in previous versions, and can create new databases in the old

format as well; if the old format is chosen, however, Access will automatically

disable any new features (EX: multivalued fields, the new attachment data type,

and SharePoint 3.0 integration) by graying them out in the Ribbon if they are

not compatible with that format; conversely, it will allow access to a few

features that are not available with the 2007 format (EX: replication and user

level security)

The table below summarizes the available formats in Access (new formats are in

BOLD SMALL CAPS); the default format is ACCDB

Database File Formats

Extension Purpose

ACCDB Normal database

ACCDE Database in “execute-only” mode (code not accessible for

modification); replaces mde

ACCDT Template for new databases

ACCDR Database in “run-time” mode (only data can be changed); rename

to accdb for full functionality

LACCDB

Locking file used with accdb database format when multiple

users access the same database to prevent corruption

(automatically deleted when all users are out of database)

.mdb Format used in Access 95 – 2003 for a normal database

.mde Format used in Access 95 – 2003 for an “execute-only” database

.ldb

Locking file used with mdb database format when multiple users

access the same database to prevent corruption (automatically

deleted when all users are out of database)

• Database: A collection of related objects designed to be used together (EX:

inventory management, scheduling, managing a list of recipes, etc.); in its

simplest form, it is composed of tables (which are made of fields and

records) in which information can be stored in an organized manner; once

information is entered into a database, it can be analyzed, printed, sorted and

retrieved; Access 2007 is a software application that assists in the creation

and maintenance of databases

• Dialog Box: A window that provides access to the advanced functionality in

Access

• Dropdown Menu: A menu of choices that appears in dialog boxes and next

to some icons; accessed by clicking the downward-facing triangle shown

here

• Field: Column of data (EX: city, phone number)

• Flat File Database: Database format that doesn’t allow related tables to be

used together; very few database applications are flat file anymore; most

flat file-style databases are created in other applications that use various

formats (EX: spreadsheet, text document, etc.), as opposed to the format

that Access uses

• Foreign Key: A field in a table that references an indexed field (usually the

primary key) of another table

• Primary Key: A field that uniquely identifies each record; no 2 records can

have the same primary key in the same table; primary keys are often numbers

(EX: Social Security numbers, UPC codes, etc.)

• Record: All related information for 1 item; a row

• Relational Database: Database format that allows for the defining of

relationships among data contained in multiple tables; this capability allows

for extensive information manipulation, as well as for smaller databases and

fewer data entry errors (due to decreased duplication of information); Access

2007 is a relational database application

• Relationship: Link between 2 tables (EX: a table with item numbers and

descriptions, and a table with sales of those items)

• Template: A predefined database that makes it easy to create a type of

database, such as for sales, contacts or inventory; some come with Access,

but many more are available from Office Online

Databases are made up of objects; the following is a brief description of objects

available in Access 2007:

Table: Stores data in records and fields very similar to a spreadsheet; all

other objects directly or indirectly access the data stored in them

Query: Locates and displays information (from tables and/or other queries)

based on user-defined criteria; many query types can be created, but only

simple Select queries will be discussed in this guide (they have the icon

shown here)

Form: Forms allow information from a table or query to be displayed in a

user-defined format (beyond the scope of this guide)

Report: Compiles, displays and prints information located in tables and/or

queries (beyond the scope of this guide)

Macro: Simple way to automate many tasks; can be used with forms, reports

and modules (beyond the scope of this guide)

Module: Provides access to complex and powerful programming abilities of Access (beyond the scope of this guide)

[NOTE: This guide will only describe the creation of a database, and the

creation and use of tables and queries]

Database Objects

Creating a New Database Unlike the other applications in the Office 2007 suite, Access 2007 (like all previous versions of Access) creates a database file on the disk as soon as the

database is created; when the application is started, the Getting Started with Microsoft Office Access dialog box is displayed, which allows both blank and

template-based databases to be created

To create a new database using a template:

• Click the Office Menu

button and select New;

the Getting Started with Microsoft Office Access dialog box will

appear as shown here

• In the Templates

section, click on the

Local Templates link

to view the templates

installed with Access;

if the desired template can’t be found (and there is an active Internet connection), use the links under

the From Microsoft Office Online heading to download one instead

• Select the desired template and click OK

Office Button

1 First Record: Moves to the first record in the table/query (if filtered, the

first record that matches the criteria) and makes it the current record

2 Previous Record: Moves back 1 record (relative to the current record) in

the table/query (if filtered, the first record before the current one that matches the criteria) and makes it the current record

3 Current Record: Displays the current record number; a specific record

can be made the current record by typing its number in the text box

4 Next Record: Moves forward 1 record (relative to the current record) in

the table/query (if filtered, the first record after the current one that matches the criteria) and makes it the current record

5 Last Record: Moves to the last record in the table/query (if filtered, the last

record that matches the criteria) and makes it the current record

6 New Record: Adds a new record to the end of the table; same as the

button

7 Filtered Status: If highlighted as shown here, a filter is in effect; if grayed

out, no filter is in effect; toggle the status with the button

8 Search: Quick way to search for a specific value—type it here and press

<ENTER> to find the next matching value; similar to basic capabilities of

Find or Filter buttons

Record Navigation Icons

Microsoft ®

Microsoft ®

to get more free charts visit us

Trang 4

Undo, Redo & Save—

Quick Access Toolbar

Clipboard Group

Cut: Removes the currently selected text or object from the database

object and places it on the clipboard for pasting

Copy: Copies the currently selected text or object from the database

object and places it on the clipboard for pasting

Paste: Places the contents of the clipboard into the current database

object

Format Painter: Picks up the formatting of the currently selected

object and allows it to be applied on another object while the format

painter icon is the cursor; when single-clicked, the next object

highlighted will be changed and the cursor returned to normal, but

when double-clicked, format painter will remain active until the format

painter icon is clicked again; primarily used in Design View

Views Group

Design View: Design is available for all objects—used to change the

structure of the selected object

Datasheet View: Datasheet is available to view and change records like

a spreadsheet; available for queries and tables

PivotTable View: PivotTable is used for complex data analysis; similar

to a spreadsheet

PivotChart View: PivotChart is used for complex data analysis with

graphical output

SQL View: SQL (used to view the SQL [Structured Query

Language] code to produce the results shown graphically in Design

View); only used with queries

Font Group

Font: Displays the font of the currently selected text and

allows it to be changed to any installed font via the dropdown menu

Font Size: The size of the selected text is displayed and can be

changed by selecting from the dropdown menu or typing in a number

Align Left: Formats the selected text to have an even left margin and

a ragged right margin

Center: Centers the selected text between the left and right margins, leaving both margins ragged

Align Right: Formats the selected text to have an even right margin

and a ragged left margin

Bold: Changes the selected text to bold

Italic: Italicizes the selected text

Underline: Underlines the selected text Font Color: Changes the text color of the selected text to a theme

color, a standard color or a custom color; selected color shows under the A; others can be selected from the dropdown menu

Fill/Back Color: Changes (or removes) the background color of the

selected object to any desired color

Gridlines: Displays gridlines options: Horizontal, Vertical, Both or

None

Alternate Fill/Back Color: Changes the background of every other

record to the specified color to make it easier to see records and edit the correct one

Rich Text Group

[NOTE: Many of the rich text options can only be applied in Design

View, or to text and memo fields that have the Text Format property set

to Rich Text]

Decrease List Level: Reduces the left margin indent of the selected

field by 1/2 inch (and changes list number as appropriate in a numbered list)

Increase List Level: Increases the left margin indent of the selected field

by 1/2inch (and changes list number as appropriate in a numbered list)

Text Direction: Specifies that the text should be read Left-to-Right or

Right-to-Left (used with other languages; EX: Arabic and Hebrew)

Numbering: Places a number in front of each paragraph in the selected

text (used with memo fields)

Bullets: Places a bullet in front of each paragraph in the selected text

(used with memo fields)

Text Highlight Color: Highlights (by changing the background color)

the selected text in 1 of 15 colors (or removes highlighting); select other colors from the dropdown menu

Records Group Refresh All: Updates the data and calculated fields; most useful in a

multiuser database

New: Creates a new record Save: Saves the current record (automatically happens when another

record is selected)

Delete: Deletes the selected text in a field; if record(s) or field(s)

is/are selected, the entire record(s) or field(s) is/are deleted; can also choose to delete a record or field from the dropdown menu

Warning: Deleting records and fields is not undoable

Totals: Adds a summary row at the bottom of Datasheet View

for totals (numeric fields can be summed, averaged, counted, etc., whereas text fields can only be counted); dynamic data that is not stored in the table

Home Tab

Opening a Database

To open a database recently accessed:

• Click on the Office Menu button and point at (but don’t click on) Open

• Select the desired file from the list on the right of the menu; if any

existing database is open, it will prompt you to save any changes, as only

1 database can be open at the same time

To open any database:

• Click on the Office Menu button and select Open

• Navigate to the desired folder in the Open dialog box

• Select the name from the list

• Click the Open button

Printing a Database Object

To print a database object:

• Open the desired object (EX: form, report, table, etc.)

• Click on the Office Menu button and point at Print

• Select Print

OR

• Select Quick Print to print a single copy of all the pages of the object to

the printer last used (usually the system’s default printer)

TIP: To view the printer that will be used, point at (but don’t click) the Quick

Print button, and the printer name will be in parentheses of the Tooltip

• Select the printer you wish to print to and observe its status (ready, needs

attention, or the number of print jobs waiting to be printed on that

printer); click the Properties button if printing properties (color vs.

black & white, contrast, etc.) need to be set

• Select the number of copies desired and check the Collate box if you

want multiple copies collated

• Specify the pages to be printed or choose to print just Selected Record(s)

(records must be selected first)

• Click OK to print the database object

To preview what a database object will look like when printed:

• Open the desired object (EX: form, report, table, etc.)

• Click on the Office Menu button, point at Print and select Print Preview

• The Print Preview tab will be displayed (and all other tabs hidden),

allowing you to change margins, change the page orientation (portrait or

landscape), scroll through the database, etc

• Click the Close Print Preview button to return to the normal ribbon tabs

Undo: Reverses the last action taken; not all actions are undoable and

many only have 1 level of Undo; if multiple items can be undone, select

them in order from the dropdown menu

Redo: Undoes the last Undo; not all actions that can be undone can be

redone

Save: Saves the current object (in Design View only); saves the current

record in all other views

to get more free charts visit us

Trang 5

Spelling: Spell-checks the data in the underlying table

More: Other display options (EX: setting row height or column

width, and hiding/unhiding fields); also used to add data as an Outlook

contact or importing data from Outlook

Sort & Filter Group

Ascending: Sorts data in current field in ascending order (EX: A to Z,

smallest to largest, oldest to newest)

Descending: Sorts data in current field in descending order (EX: Z to A,

largest to smallest, newest to oldest)

Clear All Sorts: Clears any sort criteria that have been specified,

returning to the default data order (usually the way data was entered)

Filter: Displays dialog box for simple filtering of data—check/uncheck

boxes for desired data; can also sort data and specify advanced filter

criteria (EX: <, >, =, between, contains, starts or ends with, etc.)

Selection: Filters records based on data in current field (equal to

or not equal to field’s value, or other similar, simple criteria)

Advanced Filter Options: Advanced filtering and sorting

options, such as sorting by multiple fields or filtering data by filling out

a form with all the desired criteria

Toggle Filter: Turns on/off the last filter used

TIP: If filter is enabled, “Filtered” appears in the status bar by the view

buttons

Find Group

Find: Finds text, numbers, dates, etc., throughout the current field or in

all fields of the current table or query; can be used to find part of a word,

number, etc (beginning, anywhere in field or entire field contents)

Replace: Provides all the functionality of Find, with the added

ability of replacing any or all occurrences of that text with the

replacement text specified

Go To: Moves the current record to the First, Previous, Next or

Last record, or creates a new record at the end of the table

Select: Can be used to select entire record (not just current field

contents) or all records in table/query

Tables are the key to storing information; proper table design is beyond the

scope of this guide, but the mechanics of how to do so are described here;

Access 2007 makes it much simpler to create simple tables than it was in

previous versions, but table design wizards have been removed

To create a blank table:

• On the Create tab, click Table

• Begin entering data and new fields will automatically be created

OR

• Click the Design View button and build the table design as described

below

To create a table based on a template:

• On the Create tab, click the Table Templates button and select one of

the built-in templates: Contacts, Tasks, Issues, Events or Assets

• Access will automatically create a new table with predefined fields

• Enter data into the table as created

Using Design View

To create a new field, give it a name and select the appropriate data type;

optionally, a description may be entered for the field to describe its purpose,

its role in relationships with other tables, expected data, etc

To create or modify a table in Design View:

• In the desired table, click the Design View button on the Home tab

OR

Right-click it in the Navigation Pane and select Design View

• Enter or change names for each field (up to 64 characters long), select a

data type for each field, and optionally enter a description for each field

• Optionally, enter field properties in the bottom half of the screen as needed

• When finished, click the Save button to save it and remain in Design

View, or click the Datasheet View button to save it and begin

entering/changing data

Creating Tables

Table Tools

Queries make databases useful; data is stored in tables and is just that—

raw data, but queries turn the raw data from the tables into useful information; queries are questions you need answered (such as “What are the names and phone numbers of everyone in the marketing department?” or “What are the top-selling products?”); most queries are

created in Design View, but a query that returns all the records for

selected fields and a query that generates summary data (such as total units sold or average selling price) have been automated in wizards; a few complex tasks can also be accomplished with specialized wizards; unfortunately, they are beyond the scope of this guide, but fortunately, the new sorting and filtering options already described can help answer many questions of this type without creating queries

Creating Queries

When entering data into a table or query, the following keyboard shortcuts can greatly speed up the process:

• <ESC>: Once undoes any change to a field; twice undoes all changes

to the record

• <CTRL> + ; (semicolon): Inserts the current date

• <CTRL> + <SHIFT > + : (colon): Inserts the current time

• <CTRL> + <ALT > + <SPACE>: Enters the field’s default value (if

specified [in Design View for the table for that field])

• <CTRL> + ’ (apostrophe): Copies the same value for field from

previous record

• <CTRL> + + (plus): Adds a new record (at the end of the table)

• <CTRL> + – (minus): Deletes current record

Many more keyboard shortcuts are available; view them by opening

Help, then selecting Accessibility from the list of options; from there, click on the Use the keyboard to work with Ribbon programs to view how to use Help in conjunction with buttons on the Ribbon or Keyboard

Shortcuts for Access to view the keyboard shortcuts unique to Access

2007 (and there are lots of them!) Common Keyboard Shortcuts

Tools Group Primary Key: Sets the primary key to the selected field(s)

Builder: Wizard that helps with some field properties (such as Input

Mask) or opens Expression Builder to help enter complex criteria for other field properties (EX: Default Value and Validation Rule)

TIP: The Builder button also appears to the right of those properties and does the same thing

Test Validation Rules: Tests existing data in the table to make sure

that validation rules, allow zero length fields, and required fields rules are valid for all the records; a dialog box appears for each rule not met, with the name of the rule violated and the field involved

Delete Rows: Deletes the selected field(s) Insert Rows: Inserts a new row for a new field above the

selected field

Insert Lookup Column: Inserts a new field and opens

wizard to create a lookup list (list of possible values for a field; EX: state abbreviations or days of the week)

Creates a combo (dropdown) menu used to select data from another table or a list of entered values; typically, text data (such as customer names) is displayed in the list, but the underlying primary key for the record (EX: customer ID) is stored in this table, not the longer textual form (easier to use and reduces data entry errors)

TIP: Use the Lookup tab in the Field Properties area of the design

window to change the properties of the list after it is created

Show/Hide Group Property Sheet: Displays (on the right side of the screen) the

properties of the table and allows modifications to them, if needed

Indexes: Opens a dialog box where indexes can be created and

modified, including sort order, making the index the primary key, forcing all records in the field to be unique, and ignoring (in the index) NULL (blank) values

to get more free charts visit us

Trang 6

Screen shots may vary depending on the version installed This guide is based on the

Microsoft ® , Access ® , MSN ® , and Windows ® are either registered trademarks or trademarks of Microsoft Corporation ® in the United States and/or other countries.

Microsoft product screen shot(s) reprinted with permission from Microsoft Corporation.

condensed format, it cannot possibly cover every aspect of the software BarCharts, Inc.,

information contained in this guide All rights reserved No part of this publication may

including photocopy, recording, or any information storage and retrieval system,

without written permission from the publisher ©2007 BarCharts, Inc 0208

Customer Hotline # 1.800.230.9522

We welcome your feedback so we can maintain

and exceed your expectations

Author: John Hales

A+, Network+, MCSE, CNE

free downloads &

hundreds of titles at

quickstudy.com

Data Types Text: Fixed-length text and numbers not used in calculations (EX: names,

phone numbers, ZIP codes); 1 to 255 characters; requires 1 byte on

disk per character entered per record

Memo: Variable-length text and numbers (EX: notes on a customer); up to

63,999 characters; requires 1 byte on disk per character entered per

record

Number: Byte: Whole numbers from 0 to 255; used for small values (EX:

number purchased) or as a key for small sets of data (EX: days of

the week); requires 1 byte on disk per record

Integer: Numbers from –32,768 to +32,767 (with 0 digits to the

right of the decimal); requires 2 bytes on disk per record

Long Integer: Numbers from –2,147,483,648 to +2,147,483,647

(with 0 digits to the right of the decimal); commonly used when

linking fields; requires 4 bytes on disk per record

Single: Numbers from –3.40282338to –1.401298–45for negative

numbers, and from +1.401298–45 to +3.40282338 for positive

numbers (with 6 digits of precision to the right of the decimal in

scientific notation); requires 4 bytes on disk per record

Double: Numbers from –1.79769313486231308 to

–4.94065645841247–324 for negative numbers, and from

+4.94065645841247–324 to +1.79769313486231308 for positive

numbers (with 14 digits of precision to the right of the decimal in

scientific notation); requires 8 bytes on disk per record

Decimal: Stores numbers with 28 digits of precision (with 0 to 28

digits to the right of the decimal); (thus, number range with 0 to the

right of the decimal is +/–79,228,162,514,264,337,593,543,950,335

and with 28 digits is +/–7.9228162514264337593543950335, with the

smallest non-zero value of +/–0.0000000000000000000000000001); it

requires 12 bytes on disk per record

Date/Time: Dates (from 100 to 9999 A.D.) and times; requires 8 bytes on disk

per record

Currency: Used for financial calculations and other mathematical calculations

(with 1 to 4 characters after the decimal point); faster than single or

double-data types if 1 to 4 decimal places needed as fixed-point

math used instead of floating point math; accurate to 15 characters

to the left of the decimal and 4 after it; requires 8 bytes on disk per

record

AutoNumber: Unique, sequential number that is typically incremented by 1 for

each new record; used often in relationships between tables; value

can’t be modified; if the FieldSize property is set to ReplicationID

instead of Long Integer, it is a random number guaranteed to be

unique (a GUID); requires 4 bytes on disk (16 for ReplicationIDs)

per record

Yes/No: Simplest data type; can contain only yes/no, true/false, on/off or

checked/unchecked data; requires 1 byte on disk per record

(minimum 1 byte per record for yes/no data types, but up to 8

yes/no fields can be placed in 1 byte)

OLE Object: Data linked or embedded from another application (up to 1 GB in

size), such as a picture, Word document, etc.

Hyperlink: Link to a URL (on the Internet, for example) or a UNC path

(location on the network); can also display different text from URL

or UNC path and have associated tooltip text; requires up to 2,048

bytes on disk for each of the 3 parts (text, URL, tooltip) per record,

depending on data entered for each part

Attachment: New in Access 2007; similar to but a little more efficient than OLE

Object type, because it can store any kind of file (similar to email

attachment); up to 1 GB per record

Lookup Wizard: Same as Insert Lookup Column button

TIP: When choosing a number type, use the simplest type that will meet the

requirements, as they can be processed faster in calculations and don’t take as

much space to store in the database; number formats are listed in the table above

from simplest/smallest to most complex/largest

Common Field Properties

Primary Keys

Most tables should have a

Primary Key; it uniquely

identifies each record in a table; the primary key is often

a field with “ID” in the field name and is often an

AutoNumber field (EX: in the

figure here, the Products table contains all the information about each product—each product has a ProductID associated with it that is the primary key for that table; the Orders table contains the “header” information for an invoice—who it was sold to, where to ship it, P.O number, etc.—while the Order Details table lists each item ordered, how much it cost, any discount, etc.; in this example, the Orders table is linked to the Order Details table by OrderID; OrderID is the primary key

in the Orders table and a foreign key in the Order Details table; likewise, ProductID is the primary key in the Products table and a foreign key in the Order Details table); referencing ID fields in other tables reduces errors and makes data entry faster; all but the simplest of databases should have tables with primary keys defined; they are also very useful when creating queries

Microsoft ®

There are, for most data types, the additional properties listed below; although they vary from data type to data type, and each data type has its own combination of properties, the common ones are:

Field Size: For text, the maximum number of characters allowed; for

numbers, the number type (EX: Byte, Integer, etc.)

Format: For text and memos, force to upper- or lowercase, require

a minimum number of characters, etc; for numbers and currency, the display of the numbers (EX: scientific notation, currency, percent, etc.); for date/time, the format

of the date and/or time (formats are defined in the Regional Settings control panel); for yes/no, whether to display

yes/no, true/false or on/off; for numbers, yes/no and date/time fields, custom formats can be defined

Decimal Places: The number of digits that will be displayed to the right of

the decimal point

Warning: The actual value, not the number of digits

displayed, will be used in all calculations involving the field

Input Mask: Usually used with text fields to format the display of data

for specific purposes (EX: ZIP codes, phone numbers, Social Security numbers, passwords, etc.); can also be used with date/time fields to format dates and times

Default Value: The value that will automatically be placed in the field for

all new (but not existing) records (EX: the current date, a

common title or an area code)

Caption: Used as the field (column) heading in Datasheet View for

queries and tables, and as the label for a field on a form; the default (if nothing is entered for this property) is the field name

Required: Whether or not data must be entered in the field when a new

record is created or an existing record is edited; data is commonly required for things like names, phone numbers, etc

Indexed: An index makes data retrieval and relationships to other

tables faster and more efficient; creating indexes on other fields generally decreases performance; 3 settings are

available: No (no index for the field; the default), Yes

(Duplicates OK) (field is indexed, but there may be more

than 1 record with the same value; EX: last name), and

Yes (No Duplicates) (field is indexed; no 2 records can

have the same value in the field; EX: employee ID number or Social Security number); primary key is always

Yes (No Duplicates)

to get more free charts visit us

Ngày đăng: 15/05/2017, 10:47

w