Date post: | 28-Jul-2015 |
Category: |
Technology |
Upload: | negroarmstrong |
View: | 183 times |
Download: | 1 times |
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
Section Objectives Learn how to use Microsoft Access to:
Create a database Create tables Enter table data Modify table data Delete table data Create single-table forms Create single-table reports
Note– These instructions use Windows 7 and Microsoft Access 2007
• Access 2000 format for backward compatibility
– In this section, we will work with only one table in a database.
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
Sample Database: WMCRM
• A database for a Car Dealership– Wallingford Motors, Seattle, Washington
• dealer for a new line of hybrid cars named Gaea
• SUHi - The Sport Utility Hybrid• HiLuxury - A luxury class four-door sedan hybrid• HiStandard – A basic four door sedan hybrid• HiElectra - A variant of the HiStandard that uses a higher
proportion of electrical power
– CRM application• to track current, past, and potential customers, as well as
their contacts• used by a salesperson(s)
Getting Starting with MS Access 2007
KROENKE and AUER - DATABASE CONCEPTS 4th Edition)
The Getting Started with Microsoft Office Access page
Click Blank Database
KROENKE and AUER - DATABASE CONCEPTS 4th Edition)
Creating the Access Database WMCRM
The Blank Database pane
If you don’t want the database to be created in My Documents, use the Open button to browse to the desired location
Type the database name WMCRM.accdb here
The Create button
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
The New Access Database (WMCRM.accdb)
The database name WMCRM: Database (Access 2007)
The Document Window using the tabbed documents interface
The Close Document button
The Microsoft Office Fluent User Interface
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
The Microsoft Office button
The Quick Access Toolbar
The tabbed Ribbon
The object Navigation Pane
The document window
The Close [Exit] button
The Help button
The Help button
The Status
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition) AW-1-8
The Close [Exit] button
The Help button
The Status Bar—Access in in Ready mode waiting for the user to take an action
Opening a Recently Opened Access Database
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition) AW-1-9
The Open Recent Database Pane
The WMCRM.accdb database
The Recent Documents Pane in the File Menu
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
The Recent Documents Pane
The WMCRM.accdb database
The Security Warning Bar
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition) AW-1-11
The Options… button
The Security Warning bar
The Microsoft Office Security Options Dialog Box
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
The Microsoft Office Security Options dialog box
Click the Enable this content radio button
The OK button
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition) AW-1-13
Database Column Characteristics
Column Name Type Key Required Remarks
CustomerID AutoNumber Primary Key Yes Surrogate Key
LastName Text (25) No Yes
FirstName Text (25) No Yes
Address Text (35) No No
City Text (35) No No
State Text (2) No No
ZIP Text (10) No No
Phone Text (12) No Yes
Fax Text (12) No No
Email Text (100) No No
• The CUSTOMER Table
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
Microsoft Access Data Types
Name Type of Data Size
Text Characters and numbers Maximum 255 characters
Memo Large text Maximum 65,535 characters
Number Numeric data Varies with Number type
Date/Time Dates and times from the year 100 to the year 9999
Stored as 8-byte double-precision integers
Currency Numbers with decimal places 1 to 4 decimal places
AutoNumber A unique sequential number Incremented by 1 each time
Yes/No Fields that can contain only two values
Yes/No, On/Off, True/False, etc.
Hyperlink A hyperlink address Maximum 2048 characters in each of three parts of the hyperlink address
OLE Object An object embedded in or linked to an Access table
Maximum 1 gigabyte
Attachment Any supported type of file may be attached to a record
Independent of Access
Creating the CUSTOMER Table
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition) AW-1-15
The Create command tab
The Create Ribbon
The information box for the button shows that a new table object will be created
The Table Design button
Click the Table Design button
The Table1 Tabbed Document Window
The Table Tools contextual tab is displayed along with the set of command tabs and ribbons that comprise the Table Tools
The Design command tab and its Ribbon are displayed
The Table1 tabbed document window in Design view
Selecting the Data Type
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition)
The Data Type drop-down list arrow button
The Data Type drop-down list
Select AutoNumber
The Completed CustomerID Column
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition) AW-1-18
The completed CustomerID column definition
Editing the Text Field Size
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
Edit this number to set the number of characters
Setting the Column Required Property Value
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition)
Click anywhere in the Required text box to display the arrow the Required property drop-down list arrow
Select Yes from the Required property drop-down list
Selecting the CustomerID Row
KROENKE and AUER - DATABASE CONCEPTS (4th Edition) AW-1-21
The row selector column—move the mouse cursor into this column to select a specific row
Move the mouse pointer here, then click to select the CustomerID row
Setting the Primary Key
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
A key symbol is placed here to indicate that CustomerID is the primary key of the table
Click the Primary Key button in the Tools group of the Design ribbon to set CustomerID as the primary key
Naming and Saving the CUSTOMER Table
KROENKE and AUER - DATABASE CONCEPTS (4th Edition) AW-1-23
Type the table name CUSTOMER in the Table Name text box and click OK
Click the Save button in the Quick Access Toolbar to display the Save As dialog box
The Named CUSTOMER Table
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
The table is now named CUSTOMER—the table name CUSTOMER now appears on the document tab
The table object CUSTOMER is displayed in the Navigation Pane
Click the Close button to close the CUSTOMER table
The CUSTOMER Table Object
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
After the table is closed, the CUSTOMER table object remains displayed in the Navigation Pane
Inserting Data into Tables—The CUSTOMER Data
KROENKE and AUER - DATABASE CONCEPTS 4th Edition)
LastName FirstName Address City State ZIP Phone Fax Email
Griffey Ben 5678 25th NE Seattle WA 98178 206-456-2345 [email protected]
Christman Jessica 3456 36th SW Seattle WA 98189 206-467-3456 [email protected]
Christman Rob 4567 47th NW Seattle WA 98167 206-478-4567206-478-9998 [email protected]
Hayes Judy234 Highland Place Edmonds WA 98210 425-354-8765 [email protected]
Inserting Data into Tables
• Three commonly used methodsof adding data to a table:– Entering data in the Datasheet view (similar to
working with Excel worksheet)– Build a data entry form for the table, and then
add data using the form.– Using SQL to insert data into tables (to be
discussed later)
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
Inserting Data into Tables - The Datasheet View
If you need to switch between the Datasheet View and the Design View we used to create the table, use the Design View button
The Datasheet command tab
The CUSTOMER tabbed document window with the table in Datasheet view
The Shutter Bar Open/Close Button
The Collapsed Navigation Pane
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
The Shutter Bar Open/Close Button
The CUSTOMER tabbed document window with the table in Datasheet view
The collapsed Navigation Pane
Entering Data Values for Ben Griffey
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
This row has been autonumbered as CustomerID 1
A new, blank row is added to the datasheet
The Completed CUSTOMER Datasheet
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
Column widths can be adjusted by using the mouse to drag the column border to the desired width
When entering the Email, the Access editor will change the second capital letter to lowercase—be sure to change it back!
Click the Close button to close the CUSTOMER datasheet
A new, blank row is added to the datasheet
Modifying Data in the CUSTOMER Table in Datasheet View
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
2. Click a cell in this column to select an entire row – a left- click will simply select the row, whereas a right-click will select the row and display a shortcut menu
3. The Delete Record command in the shortcut menu
1. The phone number has been modified
The Access Deletion Warning Box
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
The row with Jessica Christman’s data has already been visually removed!
Click the Yes button to actually delete the row
The New CustomerID Number
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition)
The row with the reentered Jessica Christman data now has a CustomerID of 3—AutoNumber numbers are sequential and will only be used once by Access!
Inserting Data into Tables—Using a Form
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
Creating a Data Entry Form for the CUSTOMER Table
The More Forms Gallery arrow button The Create Ribbon !
Click The Form Wizard button
Click the Create command tab
The Form Wizard
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition)
The CUSTOMER table is already selected
The Form Wizard
Click the right-facing double chevron button to select all of the fields in the table
Click the right-facing single chevron button to select a single field in the table
Click the next button
The Completed WMCRM Customer Data Form
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
The WMCRM Customer Data Form tabbed document window
The WMCRM Customer Data Form object
The Forms section of the Navigation Pane
New Record button
The WMCRM Customer Data Form for Customer Judy Hayes
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
The WMCRM Customer Data Form with the data for Judy Hayes
The Next Record button
The Close button
New Previous Record button
The Last Record button
The First Record button
The Delete Record Button
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition)
The Delete drop-down list arrow button
The Delete Record button
The Records group
The Home command tab and Ribbon
Creating Single Table Access Reports
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
Creating a Report for the CUSTOMER Table
The Report Wizard button The Create Ribbon ! The Reports group
Click the Create command tab
The Report Wizard
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
The CUSTOMER table is already selected
The Report Wizard
Click the right-facing single chevron button to select the highlighted field in the table
The Available Field List
Click the next button
The Completed Column Selection
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition)
The Selected Fields list
Click the next button
Choosing the Sort Order
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition)
The sort field 1 drop-down list button
Click the next button
Select LastName from the drop-down list
The Finished Report
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition)
The Wallingford Motors Customer Report tabbed document window
The report is sorted by LastName and then FirstName
The Reports section of the Navigation Pane
The Wallingford Motors Customer Report object
The Close button