6.2 software
-
Upload
fahriekhaisabtaufiq -
Category
Education
-
view
859 -
download
0
description
Transcript of 6.2 software
60 INFORMATION SYSTEMS
62 SOFTWARE
data
bull Data is like raw material It is not organised and has little value Data can include text numbers images audio and videondash Text data consists of sentences and paragraphsndash Number or numerical data consists of digits from 0
to 9ndash Image data are graphical imagesndash Audio data can be sound voice or tonesndash Video data consist of moving images
bull What happen to the data What do you feelbull The datainformation is not structured and not
organized
DATABASE MANAGEMENT SYSTEM
bull 621 Definition ndash Database
bull Database is structured collection of information on specific subjects
bull Its like an electronic filing system Example telephone book which contains records of names addresses and contact numbers
ndash Database Management Systems (DBMS) bull To access information from a database you need a
database management system (DBMS) This is a collection of programs that enables you to enter organize and select data in a database
PELAJAR
NamaIC
No TelTingkatan
GURU
NamaIC
No TelMatapelajaran
IBU BAPA
NamaIC
No TelPekerjaan
DBMS
COMPUTER
SOFTWARE
DATABASE
bull DATA will be organized in DATABASEand its will managed by DBMS (DATABASE MANAGEMENT SYSTEM)
Benefits of using databasebull Save Timebull Aid Communicationbull Are More Securebull Are Inexpensive Managersbull searching speedbull flexibility on the data levelbull consistency and forced harmony of databull archivizing advantagebull future grow advantagebull various of share at once
Example of DBMS
Microsoft Access MySQL Microsoft SQL Server Oracle FileMaker Pro FoxPro dBASE
So thatrsquos all
bull What is Databasebull What is DBMSbull What its benefitbull Example DBMS you may know
Using Microsoft Access
What is Microsoft Access
Microsoft Access is a relational database management system (DBMS or RDBMS) At the very core it is a software ldquoenginerdquo that provides an interface between physical data and user application queries
Other examples of DBMS applications include
bullOraclebullmySQLbullSQL Server (Microsoft)bullDB2 (IBM)bullInformix
Why choose MS-Access over SPSS Excel
Although there is always overlap the following rules might help when deciding when when not to use MS Access
bullMS Access is best used for long-term data storage andor data sharing
bullMS Excel is best used for minor data collection manipulation and especially visualization
bullSPSS is best used for minor data collection and especially data analysis
It is easy to export data from MS Access to Excel SPSS
Why choose MS-Access over other DBMS systems
Cheap readily available (packaged with MS-Office Premium)
Easy to use (relative to other systems ndashOracle may require one FTE to maintain the server as a database administrator and another FTE to serve as an application developer)
Includes front-end tools for rapid application development (RAD) This also makes MS-Access a good prototype environment
MS Acessbull MS Access is a Relational Database Management System
(RDBMS)bull An RDBMS is used to store retrieve and update data via facilities
and mechanisms that are supported from within the database system these mechanisms include tools tondash view the datandash update the datandash facility to store data (Tables)ndash present data (Forms Reports Access Web Pages)ndash generate reports from the database dynamically (Wizards)ndash Security utilities ndash only authorized users can access the
databasendash retrieve subset of the data based on a defined selection criteria
(Queries) MS Access uses Structured Query Language (see query section) to support query services
ndash backing up and restoring datandash Facilities to share the date
MS Access Environment
Fieldbull Field is a specific category of information in a tablebull In a table fields are usually shown in columns and it has its own field
name at the top bull For example StudentID Name MyKad Number Date of Birth Gender
Address and Contact Number bull All the data within the same field holds the same data type bull For example StudentID Name Gender Address and ContactNumber use
text as data type MyKad Number uses number as data type Date Of Birth uses date as data type
bull Several fields make up a record
Recordbull Record is a collection of related fields about one person place or thing in a table bull Records are arranged in rows bull The records consist of several data type such as of text date or numerical data bull A record is also known as the row or tuple bull For example we have a total of five records in this table
Filebull A file is a set of data arranged in columns and rows bull They are grouped together for a specific purpose bull For example this is a Student Registration System which records all the studentsrsquo
information bull To form a file the file must have fields and records bull A file is sometimes called a collection of related records For example a Book file
and a Student file
A FIELD is a list of entered data with the same category For example name category Ali Abu Ahmad
A RECORD is the basic retrievable unit of information in a data base It consists of a named collection of data-items andor data aggregates
A FILE is a named collection of data-items in a record For example you could represent the date as a data-aggregate consisting of the data-items month day and year
Thatrsquos all for now
bull From the example could you tell which is Field Tuple and File
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
data
bull Data is like raw material It is not organised and has little value Data can include text numbers images audio and videondash Text data consists of sentences and paragraphsndash Number or numerical data consists of digits from 0
to 9ndash Image data are graphical imagesndash Audio data can be sound voice or tonesndash Video data consist of moving images
bull What happen to the data What do you feelbull The datainformation is not structured and not
organized
DATABASE MANAGEMENT SYSTEM
bull 621 Definition ndash Database
bull Database is structured collection of information on specific subjects
bull Its like an electronic filing system Example telephone book which contains records of names addresses and contact numbers
ndash Database Management Systems (DBMS) bull To access information from a database you need a
database management system (DBMS) This is a collection of programs that enables you to enter organize and select data in a database
PELAJAR
NamaIC
No TelTingkatan
GURU
NamaIC
No TelMatapelajaran
IBU BAPA
NamaIC
No TelPekerjaan
DBMS
COMPUTER
SOFTWARE
DATABASE
bull DATA will be organized in DATABASEand its will managed by DBMS (DATABASE MANAGEMENT SYSTEM)
Benefits of using databasebull Save Timebull Aid Communicationbull Are More Securebull Are Inexpensive Managersbull searching speedbull flexibility on the data levelbull consistency and forced harmony of databull archivizing advantagebull future grow advantagebull various of share at once
Example of DBMS
Microsoft Access MySQL Microsoft SQL Server Oracle FileMaker Pro FoxPro dBASE
So thatrsquos all
bull What is Databasebull What is DBMSbull What its benefitbull Example DBMS you may know
Using Microsoft Access
What is Microsoft Access
Microsoft Access is a relational database management system (DBMS or RDBMS) At the very core it is a software ldquoenginerdquo that provides an interface between physical data and user application queries
Other examples of DBMS applications include
bullOraclebullmySQLbullSQL Server (Microsoft)bullDB2 (IBM)bullInformix
Why choose MS-Access over SPSS Excel
Although there is always overlap the following rules might help when deciding when when not to use MS Access
bullMS Access is best used for long-term data storage andor data sharing
bullMS Excel is best used for minor data collection manipulation and especially visualization
bullSPSS is best used for minor data collection and especially data analysis
It is easy to export data from MS Access to Excel SPSS
Why choose MS-Access over other DBMS systems
Cheap readily available (packaged with MS-Office Premium)
Easy to use (relative to other systems ndashOracle may require one FTE to maintain the server as a database administrator and another FTE to serve as an application developer)
Includes front-end tools for rapid application development (RAD) This also makes MS-Access a good prototype environment
MS Acessbull MS Access is a Relational Database Management System
(RDBMS)bull An RDBMS is used to store retrieve and update data via facilities
and mechanisms that are supported from within the database system these mechanisms include tools tondash view the datandash update the datandash facility to store data (Tables)ndash present data (Forms Reports Access Web Pages)ndash generate reports from the database dynamically (Wizards)ndash Security utilities ndash only authorized users can access the
databasendash retrieve subset of the data based on a defined selection criteria
(Queries) MS Access uses Structured Query Language (see query section) to support query services
ndash backing up and restoring datandash Facilities to share the date
MS Access Environment
Fieldbull Field is a specific category of information in a tablebull In a table fields are usually shown in columns and it has its own field
name at the top bull For example StudentID Name MyKad Number Date of Birth Gender
Address and Contact Number bull All the data within the same field holds the same data type bull For example StudentID Name Gender Address and ContactNumber use
text as data type MyKad Number uses number as data type Date Of Birth uses date as data type
bull Several fields make up a record
Recordbull Record is a collection of related fields about one person place or thing in a table bull Records are arranged in rows bull The records consist of several data type such as of text date or numerical data bull A record is also known as the row or tuple bull For example we have a total of five records in this table
Filebull A file is a set of data arranged in columns and rows bull They are grouped together for a specific purpose bull For example this is a Student Registration System which records all the studentsrsquo
information bull To form a file the file must have fields and records bull A file is sometimes called a collection of related records For example a Book file
and a Student file
A FIELD is a list of entered data with the same category For example name category Ali Abu Ahmad
A RECORD is the basic retrievable unit of information in a data base It consists of a named collection of data-items andor data aggregates
A FILE is a named collection of data-items in a record For example you could represent the date as a data-aggregate consisting of the data-items month day and year
Thatrsquos all for now
bull From the example could you tell which is Field Tuple and File
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
bull What happen to the data What do you feelbull The datainformation is not structured and not
organized
DATABASE MANAGEMENT SYSTEM
bull 621 Definition ndash Database
bull Database is structured collection of information on specific subjects
bull Its like an electronic filing system Example telephone book which contains records of names addresses and contact numbers
ndash Database Management Systems (DBMS) bull To access information from a database you need a
database management system (DBMS) This is a collection of programs that enables you to enter organize and select data in a database
PELAJAR
NamaIC
No TelTingkatan
GURU
NamaIC
No TelMatapelajaran
IBU BAPA
NamaIC
No TelPekerjaan
DBMS
COMPUTER
SOFTWARE
DATABASE
bull DATA will be organized in DATABASEand its will managed by DBMS (DATABASE MANAGEMENT SYSTEM)
Benefits of using databasebull Save Timebull Aid Communicationbull Are More Securebull Are Inexpensive Managersbull searching speedbull flexibility on the data levelbull consistency and forced harmony of databull archivizing advantagebull future grow advantagebull various of share at once
Example of DBMS
Microsoft Access MySQL Microsoft SQL Server Oracle FileMaker Pro FoxPro dBASE
So thatrsquos all
bull What is Databasebull What is DBMSbull What its benefitbull Example DBMS you may know
Using Microsoft Access
What is Microsoft Access
Microsoft Access is a relational database management system (DBMS or RDBMS) At the very core it is a software ldquoenginerdquo that provides an interface between physical data and user application queries
Other examples of DBMS applications include
bullOraclebullmySQLbullSQL Server (Microsoft)bullDB2 (IBM)bullInformix
Why choose MS-Access over SPSS Excel
Although there is always overlap the following rules might help when deciding when when not to use MS Access
bullMS Access is best used for long-term data storage andor data sharing
bullMS Excel is best used for minor data collection manipulation and especially visualization
bullSPSS is best used for minor data collection and especially data analysis
It is easy to export data from MS Access to Excel SPSS
Why choose MS-Access over other DBMS systems
Cheap readily available (packaged with MS-Office Premium)
Easy to use (relative to other systems ndashOracle may require one FTE to maintain the server as a database administrator and another FTE to serve as an application developer)
Includes front-end tools for rapid application development (RAD) This also makes MS-Access a good prototype environment
MS Acessbull MS Access is a Relational Database Management System
(RDBMS)bull An RDBMS is used to store retrieve and update data via facilities
and mechanisms that are supported from within the database system these mechanisms include tools tondash view the datandash update the datandash facility to store data (Tables)ndash present data (Forms Reports Access Web Pages)ndash generate reports from the database dynamically (Wizards)ndash Security utilities ndash only authorized users can access the
databasendash retrieve subset of the data based on a defined selection criteria
(Queries) MS Access uses Structured Query Language (see query section) to support query services
ndash backing up and restoring datandash Facilities to share the date
MS Access Environment
Fieldbull Field is a specific category of information in a tablebull In a table fields are usually shown in columns and it has its own field
name at the top bull For example StudentID Name MyKad Number Date of Birth Gender
Address and Contact Number bull All the data within the same field holds the same data type bull For example StudentID Name Gender Address and ContactNumber use
text as data type MyKad Number uses number as data type Date Of Birth uses date as data type
bull Several fields make up a record
Recordbull Record is a collection of related fields about one person place or thing in a table bull Records are arranged in rows bull The records consist of several data type such as of text date or numerical data bull A record is also known as the row or tuple bull For example we have a total of five records in this table
Filebull A file is a set of data arranged in columns and rows bull They are grouped together for a specific purpose bull For example this is a Student Registration System which records all the studentsrsquo
information bull To form a file the file must have fields and records bull A file is sometimes called a collection of related records For example a Book file
and a Student file
A FIELD is a list of entered data with the same category For example name category Ali Abu Ahmad
A RECORD is the basic retrievable unit of information in a data base It consists of a named collection of data-items andor data aggregates
A FILE is a named collection of data-items in a record For example you could represent the date as a data-aggregate consisting of the data-items month day and year
Thatrsquos all for now
bull From the example could you tell which is Field Tuple and File
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
DATABASE MANAGEMENT SYSTEM
bull 621 Definition ndash Database
bull Database is structured collection of information on specific subjects
bull Its like an electronic filing system Example telephone book which contains records of names addresses and contact numbers
ndash Database Management Systems (DBMS) bull To access information from a database you need a
database management system (DBMS) This is a collection of programs that enables you to enter organize and select data in a database
PELAJAR
NamaIC
No TelTingkatan
GURU
NamaIC
No TelMatapelajaran
IBU BAPA
NamaIC
No TelPekerjaan
DBMS
COMPUTER
SOFTWARE
DATABASE
bull DATA will be organized in DATABASEand its will managed by DBMS (DATABASE MANAGEMENT SYSTEM)
Benefits of using databasebull Save Timebull Aid Communicationbull Are More Securebull Are Inexpensive Managersbull searching speedbull flexibility on the data levelbull consistency and forced harmony of databull archivizing advantagebull future grow advantagebull various of share at once
Example of DBMS
Microsoft Access MySQL Microsoft SQL Server Oracle FileMaker Pro FoxPro dBASE
So thatrsquos all
bull What is Databasebull What is DBMSbull What its benefitbull Example DBMS you may know
Using Microsoft Access
What is Microsoft Access
Microsoft Access is a relational database management system (DBMS or RDBMS) At the very core it is a software ldquoenginerdquo that provides an interface between physical data and user application queries
Other examples of DBMS applications include
bullOraclebullmySQLbullSQL Server (Microsoft)bullDB2 (IBM)bullInformix
Why choose MS-Access over SPSS Excel
Although there is always overlap the following rules might help when deciding when when not to use MS Access
bullMS Access is best used for long-term data storage andor data sharing
bullMS Excel is best used for minor data collection manipulation and especially visualization
bullSPSS is best used for minor data collection and especially data analysis
It is easy to export data from MS Access to Excel SPSS
Why choose MS-Access over other DBMS systems
Cheap readily available (packaged with MS-Office Premium)
Easy to use (relative to other systems ndashOracle may require one FTE to maintain the server as a database administrator and another FTE to serve as an application developer)
Includes front-end tools for rapid application development (RAD) This also makes MS-Access a good prototype environment
MS Acessbull MS Access is a Relational Database Management System
(RDBMS)bull An RDBMS is used to store retrieve and update data via facilities
and mechanisms that are supported from within the database system these mechanisms include tools tondash view the datandash update the datandash facility to store data (Tables)ndash present data (Forms Reports Access Web Pages)ndash generate reports from the database dynamically (Wizards)ndash Security utilities ndash only authorized users can access the
databasendash retrieve subset of the data based on a defined selection criteria
(Queries) MS Access uses Structured Query Language (see query section) to support query services
ndash backing up and restoring datandash Facilities to share the date
MS Access Environment
Fieldbull Field is a specific category of information in a tablebull In a table fields are usually shown in columns and it has its own field
name at the top bull For example StudentID Name MyKad Number Date of Birth Gender
Address and Contact Number bull All the data within the same field holds the same data type bull For example StudentID Name Gender Address and ContactNumber use
text as data type MyKad Number uses number as data type Date Of Birth uses date as data type
bull Several fields make up a record
Recordbull Record is a collection of related fields about one person place or thing in a table bull Records are arranged in rows bull The records consist of several data type such as of text date or numerical data bull A record is also known as the row or tuple bull For example we have a total of five records in this table
Filebull A file is a set of data arranged in columns and rows bull They are grouped together for a specific purpose bull For example this is a Student Registration System which records all the studentsrsquo
information bull To form a file the file must have fields and records bull A file is sometimes called a collection of related records For example a Book file
and a Student file
A FIELD is a list of entered data with the same category For example name category Ali Abu Ahmad
A RECORD is the basic retrievable unit of information in a data base It consists of a named collection of data-items andor data aggregates
A FILE is a named collection of data-items in a record For example you could represent the date as a data-aggregate consisting of the data-items month day and year
Thatrsquos all for now
bull From the example could you tell which is Field Tuple and File
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
PELAJAR
NamaIC
No TelTingkatan
GURU
NamaIC
No TelMatapelajaran
IBU BAPA
NamaIC
No TelPekerjaan
DBMS
COMPUTER
SOFTWARE
DATABASE
bull DATA will be organized in DATABASEand its will managed by DBMS (DATABASE MANAGEMENT SYSTEM)
Benefits of using databasebull Save Timebull Aid Communicationbull Are More Securebull Are Inexpensive Managersbull searching speedbull flexibility on the data levelbull consistency and forced harmony of databull archivizing advantagebull future grow advantagebull various of share at once
Example of DBMS
Microsoft Access MySQL Microsoft SQL Server Oracle FileMaker Pro FoxPro dBASE
So thatrsquos all
bull What is Databasebull What is DBMSbull What its benefitbull Example DBMS you may know
Using Microsoft Access
What is Microsoft Access
Microsoft Access is a relational database management system (DBMS or RDBMS) At the very core it is a software ldquoenginerdquo that provides an interface between physical data and user application queries
Other examples of DBMS applications include
bullOraclebullmySQLbullSQL Server (Microsoft)bullDB2 (IBM)bullInformix
Why choose MS-Access over SPSS Excel
Although there is always overlap the following rules might help when deciding when when not to use MS Access
bullMS Access is best used for long-term data storage andor data sharing
bullMS Excel is best used for minor data collection manipulation and especially visualization
bullSPSS is best used for minor data collection and especially data analysis
It is easy to export data from MS Access to Excel SPSS
Why choose MS-Access over other DBMS systems
Cheap readily available (packaged with MS-Office Premium)
Easy to use (relative to other systems ndashOracle may require one FTE to maintain the server as a database administrator and another FTE to serve as an application developer)
Includes front-end tools for rapid application development (RAD) This also makes MS-Access a good prototype environment
MS Acessbull MS Access is a Relational Database Management System
(RDBMS)bull An RDBMS is used to store retrieve and update data via facilities
and mechanisms that are supported from within the database system these mechanisms include tools tondash view the datandash update the datandash facility to store data (Tables)ndash present data (Forms Reports Access Web Pages)ndash generate reports from the database dynamically (Wizards)ndash Security utilities ndash only authorized users can access the
databasendash retrieve subset of the data based on a defined selection criteria
(Queries) MS Access uses Structured Query Language (see query section) to support query services
ndash backing up and restoring datandash Facilities to share the date
MS Access Environment
Fieldbull Field is a specific category of information in a tablebull In a table fields are usually shown in columns and it has its own field
name at the top bull For example StudentID Name MyKad Number Date of Birth Gender
Address and Contact Number bull All the data within the same field holds the same data type bull For example StudentID Name Gender Address and ContactNumber use
text as data type MyKad Number uses number as data type Date Of Birth uses date as data type
bull Several fields make up a record
Recordbull Record is a collection of related fields about one person place or thing in a table bull Records are arranged in rows bull The records consist of several data type such as of text date or numerical data bull A record is also known as the row or tuple bull For example we have a total of five records in this table
Filebull A file is a set of data arranged in columns and rows bull They are grouped together for a specific purpose bull For example this is a Student Registration System which records all the studentsrsquo
information bull To form a file the file must have fields and records bull A file is sometimes called a collection of related records For example a Book file
and a Student file
A FIELD is a list of entered data with the same category For example name category Ali Abu Ahmad
A RECORD is the basic retrievable unit of information in a data base It consists of a named collection of data-items andor data aggregates
A FILE is a named collection of data-items in a record For example you could represent the date as a data-aggregate consisting of the data-items month day and year
Thatrsquos all for now
bull From the example could you tell which is Field Tuple and File
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
bull DATA will be organized in DATABASEand its will managed by DBMS (DATABASE MANAGEMENT SYSTEM)
Benefits of using databasebull Save Timebull Aid Communicationbull Are More Securebull Are Inexpensive Managersbull searching speedbull flexibility on the data levelbull consistency and forced harmony of databull archivizing advantagebull future grow advantagebull various of share at once
Example of DBMS
Microsoft Access MySQL Microsoft SQL Server Oracle FileMaker Pro FoxPro dBASE
So thatrsquos all
bull What is Databasebull What is DBMSbull What its benefitbull Example DBMS you may know
Using Microsoft Access
What is Microsoft Access
Microsoft Access is a relational database management system (DBMS or RDBMS) At the very core it is a software ldquoenginerdquo that provides an interface between physical data and user application queries
Other examples of DBMS applications include
bullOraclebullmySQLbullSQL Server (Microsoft)bullDB2 (IBM)bullInformix
Why choose MS-Access over SPSS Excel
Although there is always overlap the following rules might help when deciding when when not to use MS Access
bullMS Access is best used for long-term data storage andor data sharing
bullMS Excel is best used for minor data collection manipulation and especially visualization
bullSPSS is best used for minor data collection and especially data analysis
It is easy to export data from MS Access to Excel SPSS
Why choose MS-Access over other DBMS systems
Cheap readily available (packaged with MS-Office Premium)
Easy to use (relative to other systems ndashOracle may require one FTE to maintain the server as a database administrator and another FTE to serve as an application developer)
Includes front-end tools for rapid application development (RAD) This also makes MS-Access a good prototype environment
MS Acessbull MS Access is a Relational Database Management System
(RDBMS)bull An RDBMS is used to store retrieve and update data via facilities
and mechanisms that are supported from within the database system these mechanisms include tools tondash view the datandash update the datandash facility to store data (Tables)ndash present data (Forms Reports Access Web Pages)ndash generate reports from the database dynamically (Wizards)ndash Security utilities ndash only authorized users can access the
databasendash retrieve subset of the data based on a defined selection criteria
(Queries) MS Access uses Structured Query Language (see query section) to support query services
ndash backing up and restoring datandash Facilities to share the date
MS Access Environment
Fieldbull Field is a specific category of information in a tablebull In a table fields are usually shown in columns and it has its own field
name at the top bull For example StudentID Name MyKad Number Date of Birth Gender
Address and Contact Number bull All the data within the same field holds the same data type bull For example StudentID Name Gender Address and ContactNumber use
text as data type MyKad Number uses number as data type Date Of Birth uses date as data type
bull Several fields make up a record
Recordbull Record is a collection of related fields about one person place or thing in a table bull Records are arranged in rows bull The records consist of several data type such as of text date or numerical data bull A record is also known as the row or tuple bull For example we have a total of five records in this table
Filebull A file is a set of data arranged in columns and rows bull They are grouped together for a specific purpose bull For example this is a Student Registration System which records all the studentsrsquo
information bull To form a file the file must have fields and records bull A file is sometimes called a collection of related records For example a Book file
and a Student file
A FIELD is a list of entered data with the same category For example name category Ali Abu Ahmad
A RECORD is the basic retrievable unit of information in a data base It consists of a named collection of data-items andor data aggregates
A FILE is a named collection of data-items in a record For example you could represent the date as a data-aggregate consisting of the data-items month day and year
Thatrsquos all for now
bull From the example could you tell which is Field Tuple and File
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Benefits of using databasebull Save Timebull Aid Communicationbull Are More Securebull Are Inexpensive Managersbull searching speedbull flexibility on the data levelbull consistency and forced harmony of databull archivizing advantagebull future grow advantagebull various of share at once
Example of DBMS
Microsoft Access MySQL Microsoft SQL Server Oracle FileMaker Pro FoxPro dBASE
So thatrsquos all
bull What is Databasebull What is DBMSbull What its benefitbull Example DBMS you may know
Using Microsoft Access
What is Microsoft Access
Microsoft Access is a relational database management system (DBMS or RDBMS) At the very core it is a software ldquoenginerdquo that provides an interface between physical data and user application queries
Other examples of DBMS applications include
bullOraclebullmySQLbullSQL Server (Microsoft)bullDB2 (IBM)bullInformix
Why choose MS-Access over SPSS Excel
Although there is always overlap the following rules might help when deciding when when not to use MS Access
bullMS Access is best used for long-term data storage andor data sharing
bullMS Excel is best used for minor data collection manipulation and especially visualization
bullSPSS is best used for minor data collection and especially data analysis
It is easy to export data from MS Access to Excel SPSS
Why choose MS-Access over other DBMS systems
Cheap readily available (packaged with MS-Office Premium)
Easy to use (relative to other systems ndashOracle may require one FTE to maintain the server as a database administrator and another FTE to serve as an application developer)
Includes front-end tools for rapid application development (RAD) This also makes MS-Access a good prototype environment
MS Acessbull MS Access is a Relational Database Management System
(RDBMS)bull An RDBMS is used to store retrieve and update data via facilities
and mechanisms that are supported from within the database system these mechanisms include tools tondash view the datandash update the datandash facility to store data (Tables)ndash present data (Forms Reports Access Web Pages)ndash generate reports from the database dynamically (Wizards)ndash Security utilities ndash only authorized users can access the
databasendash retrieve subset of the data based on a defined selection criteria
(Queries) MS Access uses Structured Query Language (see query section) to support query services
ndash backing up and restoring datandash Facilities to share the date
MS Access Environment
Fieldbull Field is a specific category of information in a tablebull In a table fields are usually shown in columns and it has its own field
name at the top bull For example StudentID Name MyKad Number Date of Birth Gender
Address and Contact Number bull All the data within the same field holds the same data type bull For example StudentID Name Gender Address and ContactNumber use
text as data type MyKad Number uses number as data type Date Of Birth uses date as data type
bull Several fields make up a record
Recordbull Record is a collection of related fields about one person place or thing in a table bull Records are arranged in rows bull The records consist of several data type such as of text date or numerical data bull A record is also known as the row or tuple bull For example we have a total of five records in this table
Filebull A file is a set of data arranged in columns and rows bull They are grouped together for a specific purpose bull For example this is a Student Registration System which records all the studentsrsquo
information bull To form a file the file must have fields and records bull A file is sometimes called a collection of related records For example a Book file
and a Student file
A FIELD is a list of entered data with the same category For example name category Ali Abu Ahmad
A RECORD is the basic retrievable unit of information in a data base It consists of a named collection of data-items andor data aggregates
A FILE is a named collection of data-items in a record For example you could represent the date as a data-aggregate consisting of the data-items month day and year
Thatrsquos all for now
bull From the example could you tell which is Field Tuple and File
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Example of DBMS
Microsoft Access MySQL Microsoft SQL Server Oracle FileMaker Pro FoxPro dBASE
So thatrsquos all
bull What is Databasebull What is DBMSbull What its benefitbull Example DBMS you may know
Using Microsoft Access
What is Microsoft Access
Microsoft Access is a relational database management system (DBMS or RDBMS) At the very core it is a software ldquoenginerdquo that provides an interface between physical data and user application queries
Other examples of DBMS applications include
bullOraclebullmySQLbullSQL Server (Microsoft)bullDB2 (IBM)bullInformix
Why choose MS-Access over SPSS Excel
Although there is always overlap the following rules might help when deciding when when not to use MS Access
bullMS Access is best used for long-term data storage andor data sharing
bullMS Excel is best used for minor data collection manipulation and especially visualization
bullSPSS is best used for minor data collection and especially data analysis
It is easy to export data from MS Access to Excel SPSS
Why choose MS-Access over other DBMS systems
Cheap readily available (packaged with MS-Office Premium)
Easy to use (relative to other systems ndashOracle may require one FTE to maintain the server as a database administrator and another FTE to serve as an application developer)
Includes front-end tools for rapid application development (RAD) This also makes MS-Access a good prototype environment
MS Acessbull MS Access is a Relational Database Management System
(RDBMS)bull An RDBMS is used to store retrieve and update data via facilities
and mechanisms that are supported from within the database system these mechanisms include tools tondash view the datandash update the datandash facility to store data (Tables)ndash present data (Forms Reports Access Web Pages)ndash generate reports from the database dynamically (Wizards)ndash Security utilities ndash only authorized users can access the
databasendash retrieve subset of the data based on a defined selection criteria
(Queries) MS Access uses Structured Query Language (see query section) to support query services
ndash backing up and restoring datandash Facilities to share the date
MS Access Environment
Fieldbull Field is a specific category of information in a tablebull In a table fields are usually shown in columns and it has its own field
name at the top bull For example StudentID Name MyKad Number Date of Birth Gender
Address and Contact Number bull All the data within the same field holds the same data type bull For example StudentID Name Gender Address and ContactNumber use
text as data type MyKad Number uses number as data type Date Of Birth uses date as data type
bull Several fields make up a record
Recordbull Record is a collection of related fields about one person place or thing in a table bull Records are arranged in rows bull The records consist of several data type such as of text date or numerical data bull A record is also known as the row or tuple bull For example we have a total of five records in this table
Filebull A file is a set of data arranged in columns and rows bull They are grouped together for a specific purpose bull For example this is a Student Registration System which records all the studentsrsquo
information bull To form a file the file must have fields and records bull A file is sometimes called a collection of related records For example a Book file
and a Student file
A FIELD is a list of entered data with the same category For example name category Ali Abu Ahmad
A RECORD is the basic retrievable unit of information in a data base It consists of a named collection of data-items andor data aggregates
A FILE is a named collection of data-items in a record For example you could represent the date as a data-aggregate consisting of the data-items month day and year
Thatrsquos all for now
bull From the example could you tell which is Field Tuple and File
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
So thatrsquos all
bull What is Databasebull What is DBMSbull What its benefitbull Example DBMS you may know
Using Microsoft Access
What is Microsoft Access
Microsoft Access is a relational database management system (DBMS or RDBMS) At the very core it is a software ldquoenginerdquo that provides an interface between physical data and user application queries
Other examples of DBMS applications include
bullOraclebullmySQLbullSQL Server (Microsoft)bullDB2 (IBM)bullInformix
Why choose MS-Access over SPSS Excel
Although there is always overlap the following rules might help when deciding when when not to use MS Access
bullMS Access is best used for long-term data storage andor data sharing
bullMS Excel is best used for minor data collection manipulation and especially visualization
bullSPSS is best used for minor data collection and especially data analysis
It is easy to export data from MS Access to Excel SPSS
Why choose MS-Access over other DBMS systems
Cheap readily available (packaged with MS-Office Premium)
Easy to use (relative to other systems ndashOracle may require one FTE to maintain the server as a database administrator and another FTE to serve as an application developer)
Includes front-end tools for rapid application development (RAD) This also makes MS-Access a good prototype environment
MS Acessbull MS Access is a Relational Database Management System
(RDBMS)bull An RDBMS is used to store retrieve and update data via facilities
and mechanisms that are supported from within the database system these mechanisms include tools tondash view the datandash update the datandash facility to store data (Tables)ndash present data (Forms Reports Access Web Pages)ndash generate reports from the database dynamically (Wizards)ndash Security utilities ndash only authorized users can access the
databasendash retrieve subset of the data based on a defined selection criteria
(Queries) MS Access uses Structured Query Language (see query section) to support query services
ndash backing up and restoring datandash Facilities to share the date
MS Access Environment
Fieldbull Field is a specific category of information in a tablebull In a table fields are usually shown in columns and it has its own field
name at the top bull For example StudentID Name MyKad Number Date of Birth Gender
Address and Contact Number bull All the data within the same field holds the same data type bull For example StudentID Name Gender Address and ContactNumber use
text as data type MyKad Number uses number as data type Date Of Birth uses date as data type
bull Several fields make up a record
Recordbull Record is a collection of related fields about one person place or thing in a table bull Records are arranged in rows bull The records consist of several data type such as of text date or numerical data bull A record is also known as the row or tuple bull For example we have a total of five records in this table
Filebull A file is a set of data arranged in columns and rows bull They are grouped together for a specific purpose bull For example this is a Student Registration System which records all the studentsrsquo
information bull To form a file the file must have fields and records bull A file is sometimes called a collection of related records For example a Book file
and a Student file
A FIELD is a list of entered data with the same category For example name category Ali Abu Ahmad
A RECORD is the basic retrievable unit of information in a data base It consists of a named collection of data-items andor data aggregates
A FILE is a named collection of data-items in a record For example you could represent the date as a data-aggregate consisting of the data-items month day and year
Thatrsquos all for now
bull From the example could you tell which is Field Tuple and File
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Using Microsoft Access
What is Microsoft Access
Microsoft Access is a relational database management system (DBMS or RDBMS) At the very core it is a software ldquoenginerdquo that provides an interface between physical data and user application queries
Other examples of DBMS applications include
bullOraclebullmySQLbullSQL Server (Microsoft)bullDB2 (IBM)bullInformix
Why choose MS-Access over SPSS Excel
Although there is always overlap the following rules might help when deciding when when not to use MS Access
bullMS Access is best used for long-term data storage andor data sharing
bullMS Excel is best used for minor data collection manipulation and especially visualization
bullSPSS is best used for minor data collection and especially data analysis
It is easy to export data from MS Access to Excel SPSS
Why choose MS-Access over other DBMS systems
Cheap readily available (packaged with MS-Office Premium)
Easy to use (relative to other systems ndashOracle may require one FTE to maintain the server as a database administrator and another FTE to serve as an application developer)
Includes front-end tools for rapid application development (RAD) This also makes MS-Access a good prototype environment
MS Acessbull MS Access is a Relational Database Management System
(RDBMS)bull An RDBMS is used to store retrieve and update data via facilities
and mechanisms that are supported from within the database system these mechanisms include tools tondash view the datandash update the datandash facility to store data (Tables)ndash present data (Forms Reports Access Web Pages)ndash generate reports from the database dynamically (Wizards)ndash Security utilities ndash only authorized users can access the
databasendash retrieve subset of the data based on a defined selection criteria
(Queries) MS Access uses Structured Query Language (see query section) to support query services
ndash backing up and restoring datandash Facilities to share the date
MS Access Environment
Fieldbull Field is a specific category of information in a tablebull In a table fields are usually shown in columns and it has its own field
name at the top bull For example StudentID Name MyKad Number Date of Birth Gender
Address and Contact Number bull All the data within the same field holds the same data type bull For example StudentID Name Gender Address and ContactNumber use
text as data type MyKad Number uses number as data type Date Of Birth uses date as data type
bull Several fields make up a record
Recordbull Record is a collection of related fields about one person place or thing in a table bull Records are arranged in rows bull The records consist of several data type such as of text date or numerical data bull A record is also known as the row or tuple bull For example we have a total of five records in this table
Filebull A file is a set of data arranged in columns and rows bull They are grouped together for a specific purpose bull For example this is a Student Registration System which records all the studentsrsquo
information bull To form a file the file must have fields and records bull A file is sometimes called a collection of related records For example a Book file
and a Student file
A FIELD is a list of entered data with the same category For example name category Ali Abu Ahmad
A RECORD is the basic retrievable unit of information in a data base It consists of a named collection of data-items andor data aggregates
A FILE is a named collection of data-items in a record For example you could represent the date as a data-aggregate consisting of the data-items month day and year
Thatrsquos all for now
bull From the example could you tell which is Field Tuple and File
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
What is Microsoft Access
Microsoft Access is a relational database management system (DBMS or RDBMS) At the very core it is a software ldquoenginerdquo that provides an interface between physical data and user application queries
Other examples of DBMS applications include
bullOraclebullmySQLbullSQL Server (Microsoft)bullDB2 (IBM)bullInformix
Why choose MS-Access over SPSS Excel
Although there is always overlap the following rules might help when deciding when when not to use MS Access
bullMS Access is best used for long-term data storage andor data sharing
bullMS Excel is best used for minor data collection manipulation and especially visualization
bullSPSS is best used for minor data collection and especially data analysis
It is easy to export data from MS Access to Excel SPSS
Why choose MS-Access over other DBMS systems
Cheap readily available (packaged with MS-Office Premium)
Easy to use (relative to other systems ndashOracle may require one FTE to maintain the server as a database administrator and another FTE to serve as an application developer)
Includes front-end tools for rapid application development (RAD) This also makes MS-Access a good prototype environment
MS Acessbull MS Access is a Relational Database Management System
(RDBMS)bull An RDBMS is used to store retrieve and update data via facilities
and mechanisms that are supported from within the database system these mechanisms include tools tondash view the datandash update the datandash facility to store data (Tables)ndash present data (Forms Reports Access Web Pages)ndash generate reports from the database dynamically (Wizards)ndash Security utilities ndash only authorized users can access the
databasendash retrieve subset of the data based on a defined selection criteria
(Queries) MS Access uses Structured Query Language (see query section) to support query services
ndash backing up and restoring datandash Facilities to share the date
MS Access Environment
Fieldbull Field is a specific category of information in a tablebull In a table fields are usually shown in columns and it has its own field
name at the top bull For example StudentID Name MyKad Number Date of Birth Gender
Address and Contact Number bull All the data within the same field holds the same data type bull For example StudentID Name Gender Address and ContactNumber use
text as data type MyKad Number uses number as data type Date Of Birth uses date as data type
bull Several fields make up a record
Recordbull Record is a collection of related fields about one person place or thing in a table bull Records are arranged in rows bull The records consist of several data type such as of text date or numerical data bull A record is also known as the row or tuple bull For example we have a total of five records in this table
Filebull A file is a set of data arranged in columns and rows bull They are grouped together for a specific purpose bull For example this is a Student Registration System which records all the studentsrsquo
information bull To form a file the file must have fields and records bull A file is sometimes called a collection of related records For example a Book file
and a Student file
A FIELD is a list of entered data with the same category For example name category Ali Abu Ahmad
A RECORD is the basic retrievable unit of information in a data base It consists of a named collection of data-items andor data aggregates
A FILE is a named collection of data-items in a record For example you could represent the date as a data-aggregate consisting of the data-items month day and year
Thatrsquos all for now
bull From the example could you tell which is Field Tuple and File
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Why choose MS-Access over SPSS Excel
Although there is always overlap the following rules might help when deciding when when not to use MS Access
bullMS Access is best used for long-term data storage andor data sharing
bullMS Excel is best used for minor data collection manipulation and especially visualization
bullSPSS is best used for minor data collection and especially data analysis
It is easy to export data from MS Access to Excel SPSS
Why choose MS-Access over other DBMS systems
Cheap readily available (packaged with MS-Office Premium)
Easy to use (relative to other systems ndashOracle may require one FTE to maintain the server as a database administrator and another FTE to serve as an application developer)
Includes front-end tools for rapid application development (RAD) This also makes MS-Access a good prototype environment
MS Acessbull MS Access is a Relational Database Management System
(RDBMS)bull An RDBMS is used to store retrieve and update data via facilities
and mechanisms that are supported from within the database system these mechanisms include tools tondash view the datandash update the datandash facility to store data (Tables)ndash present data (Forms Reports Access Web Pages)ndash generate reports from the database dynamically (Wizards)ndash Security utilities ndash only authorized users can access the
databasendash retrieve subset of the data based on a defined selection criteria
(Queries) MS Access uses Structured Query Language (see query section) to support query services
ndash backing up and restoring datandash Facilities to share the date
MS Access Environment
Fieldbull Field is a specific category of information in a tablebull In a table fields are usually shown in columns and it has its own field
name at the top bull For example StudentID Name MyKad Number Date of Birth Gender
Address and Contact Number bull All the data within the same field holds the same data type bull For example StudentID Name Gender Address and ContactNumber use
text as data type MyKad Number uses number as data type Date Of Birth uses date as data type
bull Several fields make up a record
Recordbull Record is a collection of related fields about one person place or thing in a table bull Records are arranged in rows bull The records consist of several data type such as of text date or numerical data bull A record is also known as the row or tuple bull For example we have a total of five records in this table
Filebull A file is a set of data arranged in columns and rows bull They are grouped together for a specific purpose bull For example this is a Student Registration System which records all the studentsrsquo
information bull To form a file the file must have fields and records bull A file is sometimes called a collection of related records For example a Book file
and a Student file
A FIELD is a list of entered data with the same category For example name category Ali Abu Ahmad
A RECORD is the basic retrievable unit of information in a data base It consists of a named collection of data-items andor data aggregates
A FILE is a named collection of data-items in a record For example you could represent the date as a data-aggregate consisting of the data-items month day and year
Thatrsquos all for now
bull From the example could you tell which is Field Tuple and File
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Why choose MS-Access over other DBMS systems
Cheap readily available (packaged with MS-Office Premium)
Easy to use (relative to other systems ndashOracle may require one FTE to maintain the server as a database administrator and another FTE to serve as an application developer)
Includes front-end tools for rapid application development (RAD) This also makes MS-Access a good prototype environment
MS Acessbull MS Access is a Relational Database Management System
(RDBMS)bull An RDBMS is used to store retrieve and update data via facilities
and mechanisms that are supported from within the database system these mechanisms include tools tondash view the datandash update the datandash facility to store data (Tables)ndash present data (Forms Reports Access Web Pages)ndash generate reports from the database dynamically (Wizards)ndash Security utilities ndash only authorized users can access the
databasendash retrieve subset of the data based on a defined selection criteria
(Queries) MS Access uses Structured Query Language (see query section) to support query services
ndash backing up and restoring datandash Facilities to share the date
MS Access Environment
Fieldbull Field is a specific category of information in a tablebull In a table fields are usually shown in columns and it has its own field
name at the top bull For example StudentID Name MyKad Number Date of Birth Gender
Address and Contact Number bull All the data within the same field holds the same data type bull For example StudentID Name Gender Address and ContactNumber use
text as data type MyKad Number uses number as data type Date Of Birth uses date as data type
bull Several fields make up a record
Recordbull Record is a collection of related fields about one person place or thing in a table bull Records are arranged in rows bull The records consist of several data type such as of text date or numerical data bull A record is also known as the row or tuple bull For example we have a total of five records in this table
Filebull A file is a set of data arranged in columns and rows bull They are grouped together for a specific purpose bull For example this is a Student Registration System which records all the studentsrsquo
information bull To form a file the file must have fields and records bull A file is sometimes called a collection of related records For example a Book file
and a Student file
A FIELD is a list of entered data with the same category For example name category Ali Abu Ahmad
A RECORD is the basic retrievable unit of information in a data base It consists of a named collection of data-items andor data aggregates
A FILE is a named collection of data-items in a record For example you could represent the date as a data-aggregate consisting of the data-items month day and year
Thatrsquos all for now
bull From the example could you tell which is Field Tuple and File
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
MS Acessbull MS Access is a Relational Database Management System
(RDBMS)bull An RDBMS is used to store retrieve and update data via facilities
and mechanisms that are supported from within the database system these mechanisms include tools tondash view the datandash update the datandash facility to store data (Tables)ndash present data (Forms Reports Access Web Pages)ndash generate reports from the database dynamically (Wizards)ndash Security utilities ndash only authorized users can access the
databasendash retrieve subset of the data based on a defined selection criteria
(Queries) MS Access uses Structured Query Language (see query section) to support query services
ndash backing up and restoring datandash Facilities to share the date
MS Access Environment
Fieldbull Field is a specific category of information in a tablebull In a table fields are usually shown in columns and it has its own field
name at the top bull For example StudentID Name MyKad Number Date of Birth Gender
Address and Contact Number bull All the data within the same field holds the same data type bull For example StudentID Name Gender Address and ContactNumber use
text as data type MyKad Number uses number as data type Date Of Birth uses date as data type
bull Several fields make up a record
Recordbull Record is a collection of related fields about one person place or thing in a table bull Records are arranged in rows bull The records consist of several data type such as of text date or numerical data bull A record is also known as the row or tuple bull For example we have a total of five records in this table
Filebull A file is a set of data arranged in columns and rows bull They are grouped together for a specific purpose bull For example this is a Student Registration System which records all the studentsrsquo
information bull To form a file the file must have fields and records bull A file is sometimes called a collection of related records For example a Book file
and a Student file
A FIELD is a list of entered data with the same category For example name category Ali Abu Ahmad
A RECORD is the basic retrievable unit of information in a data base It consists of a named collection of data-items andor data aggregates
A FILE is a named collection of data-items in a record For example you could represent the date as a data-aggregate consisting of the data-items month day and year
Thatrsquos all for now
bull From the example could you tell which is Field Tuple and File
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
MS Access Environment
Fieldbull Field is a specific category of information in a tablebull In a table fields are usually shown in columns and it has its own field
name at the top bull For example StudentID Name MyKad Number Date of Birth Gender
Address and Contact Number bull All the data within the same field holds the same data type bull For example StudentID Name Gender Address and ContactNumber use
text as data type MyKad Number uses number as data type Date Of Birth uses date as data type
bull Several fields make up a record
Recordbull Record is a collection of related fields about one person place or thing in a table bull Records are arranged in rows bull The records consist of several data type such as of text date or numerical data bull A record is also known as the row or tuple bull For example we have a total of five records in this table
Filebull A file is a set of data arranged in columns and rows bull They are grouped together for a specific purpose bull For example this is a Student Registration System which records all the studentsrsquo
information bull To form a file the file must have fields and records bull A file is sometimes called a collection of related records For example a Book file
and a Student file
A FIELD is a list of entered data with the same category For example name category Ali Abu Ahmad
A RECORD is the basic retrievable unit of information in a data base It consists of a named collection of data-items andor data aggregates
A FILE is a named collection of data-items in a record For example you could represent the date as a data-aggregate consisting of the data-items month day and year
Thatrsquos all for now
bull From the example could you tell which is Field Tuple and File
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Fieldbull Field is a specific category of information in a tablebull In a table fields are usually shown in columns and it has its own field
name at the top bull For example StudentID Name MyKad Number Date of Birth Gender
Address and Contact Number bull All the data within the same field holds the same data type bull For example StudentID Name Gender Address and ContactNumber use
text as data type MyKad Number uses number as data type Date Of Birth uses date as data type
bull Several fields make up a record
Recordbull Record is a collection of related fields about one person place or thing in a table bull Records are arranged in rows bull The records consist of several data type such as of text date or numerical data bull A record is also known as the row or tuple bull For example we have a total of five records in this table
Filebull A file is a set of data arranged in columns and rows bull They are grouped together for a specific purpose bull For example this is a Student Registration System which records all the studentsrsquo
information bull To form a file the file must have fields and records bull A file is sometimes called a collection of related records For example a Book file
and a Student file
A FIELD is a list of entered data with the same category For example name category Ali Abu Ahmad
A RECORD is the basic retrievable unit of information in a data base It consists of a named collection of data-items andor data aggregates
A FILE is a named collection of data-items in a record For example you could represent the date as a data-aggregate consisting of the data-items month day and year
Thatrsquos all for now
bull From the example could you tell which is Field Tuple and File
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Recordbull Record is a collection of related fields about one person place or thing in a table bull Records are arranged in rows bull The records consist of several data type such as of text date or numerical data bull A record is also known as the row or tuple bull For example we have a total of five records in this table
Filebull A file is a set of data arranged in columns and rows bull They are grouped together for a specific purpose bull For example this is a Student Registration System which records all the studentsrsquo
information bull To form a file the file must have fields and records bull A file is sometimes called a collection of related records For example a Book file
and a Student file
A FIELD is a list of entered data with the same category For example name category Ali Abu Ahmad
A RECORD is the basic retrievable unit of information in a data base It consists of a named collection of data-items andor data aggregates
A FILE is a named collection of data-items in a record For example you could represent the date as a data-aggregate consisting of the data-items month day and year
Thatrsquos all for now
bull From the example could you tell which is Field Tuple and File
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Filebull A file is a set of data arranged in columns and rows bull They are grouped together for a specific purpose bull For example this is a Student Registration System which records all the studentsrsquo
information bull To form a file the file must have fields and records bull A file is sometimes called a collection of related records For example a Book file
and a Student file
A FIELD is a list of entered data with the same category For example name category Ali Abu Ahmad
A RECORD is the basic retrievable unit of information in a data base It consists of a named collection of data-items andor data aggregates
A FILE is a named collection of data-items in a record For example you could represent the date as a data-aggregate consisting of the data-items month day and year
Thatrsquos all for now
bull From the example could you tell which is Field Tuple and File
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
A FIELD is a list of entered data with the same category For example name category Ali Abu Ahmad
A RECORD is the basic retrievable unit of information in a data base It consists of a named collection of data-items andor data aggregates
A FILE is a named collection of data-items in a record For example you could represent the date as a data-aggregate consisting of the data-items month day and year
Thatrsquos all for now
bull From the example could you tell which is Field Tuple and File
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Thatrsquos all for now
bull From the example could you tell which is Field Tuple and File
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
60 INFORMATION SYSTEMS
62 SOFTWARE4 period (160 minutes)
consist of students exploring the MS Access in Comp Lab
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Using Microsoft Access
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
GETTING STARTED
bull Double click on your desk top icon or
bull Click Start Programs Microsoft Access
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Create a New Database
bull Click Blank Access Database
bull Click OK
bull Save in - click the drop down arrow -click location to save database
bull File name type a file name forthe database
bull Click Create
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Open an Existing Database
bull Click Open an Existing Database
bull Select a file from list of files presented in the open window
bull Click OK
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
THE ACCESS DATABASE WINDOW
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
ACCESS DATABASE
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
bull Tables bull Queries bull Forms bull 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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
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 (eg an employee) The record is made up of several fields each field contains one piece of information relating to the item (eg employees name address phone etc)
Query A query extracts selected data from a table (or another query) and presents it in spreadsheet format
Form 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
Report A report extracts selected data from a table (or query) and formats it for printing
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
DATABASE WINDOW COMPONENTS
Menu Bar
Command Buttons
Object Tabs
Favorites
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
DATABASE WINDOW COMPONENTS
Menu Bar This toolbar contains commands and submenus They will change depending on the functions you are currently performing
Object Tabs Allow you to see a list of all objects in that category Tables Queries Forms Reports Macros and Modules
Command buttons you to Open an existing database modify the Design of an existing database or create a New database
GroupsA 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 andor Queries that the Forms are based on
Favorites The Favorites folder stores shortcuts to frequently used file folders and databases
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
TABLES
Record (row)
Field (column)
Navigator Scroll Bars
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
- 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 ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Movement Keys
Tab Enter ndashmove you from field to field
Scroll bars (vertical horizontal) ndashmove up and down rows through pages of records or across several columns
Page Up and Down ndashmove one page at a time
CtrlHome and CtrlEnd ndashmove to the top or bottom of the table
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
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
bull Fields - represented by columns bull Records - stored as rows
Tables look like EXCEL worksheets
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
CHANGE COLUMN APPEARANCE
Select a column with the down arrow
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
CHANGE COLUMN APPEARANCE
Resize bull Position mouse cursor on the vertical line between column headings to display a cross bull Drag left or right or bull Double click on the vertical line to let Access choose the best column width
Select a Column bull Place the mouse cursor in the heading of a column 10487841048784 and click
Move bull Click the mouse in the heading of a column10487841048784 bull When the white arrow cursor is displayed hold down the left mouse button A small white box appears bull Drag this column to its new position
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Hide bull Click cursor in any row of column to be hidden bull Click Format bull Click Hide Columns
Show bull Click Format bull Choose Unhide Columns bull Click check box next to the column name to be shown bull 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 bull Position cursor in column to be frozen bull Click Format bull Click Freeze Columns Note the frozen columns are re-positioned to the left side of the screen
Unfreeze bull Click Format bull Click Unfreeze All Columns Note you may want to move the unfrozen columns to their original position
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
ENTER VIEW AND MODIFY DATA
Undo Sort Find ENTERING DATA
Enter Data bull Type data and press Enter or Tab to move to the next cell
VIEW DATA
Find Data bull Click the Find icon to locate a particular field value in the table bull The Find and Replace dialog box allows you to search for all or part of a field in one or many columns
Sorting bull 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 bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
MODIFY DATA
Edit Undo bull 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) bull Undo all changes to this record as long as you are still in edit mode bull Pencil on the left side of the record indicates edit mode (as opposed to view mode)
Replace Data
bull On the Edit Menu click Replace bull In the Find What box type the value you want to find bull In the Replace With box type the value you want to replace it with
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
TABLE DESIGN
Design View
Data Normalization
Primary Key
Smallest Components (Address)
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
TABLE DESIGNTables are the heart of a database If tables are organized efficiently query and report design will be straightforward Design a Table bull Click Table Tab bull Click New bull 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
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
bull Eliminate redundancy ndash data values should not be repeated in several records of a table and records should not have empty fields bull Define smallest components ndash break your data into distinct components eg 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
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
DATA TYPE DEFINITIONS
Textbull any character (alpha special characters numbers) bull up to 255 in length bull numbers cannot be used for calculations
Memo bull any character (alpha special characters numbers) bull up to 65000 in length bull numbers cannot be used for calculations bull field cannot be sorted or indexed
Number bull numeric data to be used for mathematical calculations bull not to be used for currency fields bull Field Size property further defines its function and size
Date time bull must be a valid datetime entry at entry time bull format property determines display format
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Currencybull prevents rounding off during calculations bull 15 digits to the left of the decimal point and 4 to the right are available
Auto Number bull ACCESS automatically creates an incrementing unique number bull controlled by ACCESS bull cannot repeat Note since an Auto number 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
YesNo bull logical indicator (one of two values) bull onoff truefalse yesno bull Yes value is yes on true or -1 No value is no off false or 0
OLE object bull used to store Word or Excel documents bull can also store pictures sound and graphics created by other programs
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
FIELD PROPERTIES
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
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
bull Click a field in the Design view window bull Press F6 to jump to the related Field Properties display
Field Size - Sets a maximum size for data varies according to Data Type bull text is 255 characters bull number - byte (255) - integer (+- 32000 no fractions) - long integer (+- 2 billion no fractions) - single (floating point decimal precision 7) - double floating point (decimal precision 15)
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Format Datetime 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 rsquos datetime fields ACCESS offers a Wizard for text and datetime 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 Field Name Default Value Specifies a value that will be automatically
entered when you create a new record
Validation Rule Controls the values to be entered into a field eg lt 112000
Validation Text The message that will be displayed when the rule is broken eg ldquoCannot enter
dates later than 12311999rdquo
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Required Click Yes to indicate that data must be entered into the field
Allow Zero Length Applies to text memo and Hyperlink only Entering a zero length string (ldquordquo) means ldquoI know there is no value for this fieldrdquo used with Required property
Indexed 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 eg LastName bull Click the Indexed property in Field Properties bull Click the drop down list arrow for options bull Click an option - No to remove an existing index - Yes (Duplicates OK) for non-unique indexing or - Yes (No Duplicates) for unique indexing
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
TABLE RELATIONSHIPS View related tables in Datasheet view
Sub datasheet
Orders Order Details
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Fields from distinct tables can be merged on queries and reports
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
TABLE RELATIONSHIPS
Viewing multiple tables in the same window in Datasheet view Open multiple tables in Datasheet View bull From Database Window click a table and click Open bull Click a second table click Open bull Click Window on Menu Action Bar bull Click Tile Vertically
Sub datasheet 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 Sub datasheet (and the small + is now a -)
Each Table has a Unique Focus Each table focuses on one topic the topic is usually defined by the Primary Key ndash eg 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 The Orders Table lists
bull Order numbers bull Customer numbers
Customer details are carried in the Customers Table and Product descriptions are carried in the Products Table
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
HELP FROM THE WEB
bull Click Help in the Menu Bar
bull Click Office on the Web to access the Internet and open the Microsoft Office Update web page
bull Click - Access Favorites (click on a topic) - Under Access click Assistance
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
FORMS
Header
Detail
Footer
Form View
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
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 1 Form header 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
2 Detail Displays records You can display one or many records on a screen
3 Form footer Appears at the bottom of every page This section is used to display instructions command buttons or unbound controls to accept input
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 bull bound controls are tied to a field in an underlying table or query bull unbound controls do not have a data source they display static
information (labels headings) or pictures bull calculated controls use expressions as the source of data
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
FORM WIZARD
AutoForm
Form Wizard
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
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 bull Click Table Tab and select a Table bull Click Open bull Click New Object AutoForm icon in Table Datasheet Toolbar
ORForm Wizard Menu bull Click Forms Tab bull Click New bull Click Form Wizard bull Select a Table or Query from the drop-down list (OK) bull Follow prompts - select Fields (Next) - select Layout (Next) - select Style (Next) - create a Title (Finish)
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
TOOLBARS
Form Design
Formatting (Form Report)
Toolbox
(FOR MODIFICATION)
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Modify a Form for the following reasons bull data fields need to be relocated in order to fit on one screen bull font size should be enlarged for easy reading bull cosmetic purposes eg adding a logo or enhancing appearance with color
Design View A form has three sections Form Header Detail Form Footer
Toolbars Display three toolbars to modify a Form Form Design Formatting FormReport and Toolbox
To display toolbars bull Click the Forms Tab bull Click Design bull Click View in the Menu bar bull Click toolbars bull Click the desired Toolbar
FORMATTING TOOLBAR 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
bull FillBack color - paint background colors in forms labels and textboxes
bull FontFore Color - change text color bull LineBorder Color - change line color eg borderlines
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
LineBorder 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
bull click the icon bull click the area where you want to insert the box bull hold down the mouse button and draw (drag) a
square big enough to hold the box bull release the mouse button bull type text
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Unbound object frame Add an unbound picture to the form bull click the icon bull click the area where you want to insert the object bull hold down the mouse button and draw a square big
enough to store the picture bull release the mouse button (Insert Object window
appears) bull choose from a list of object types such as Clip Art
Gallery Paintbrush picture etc
Object frame properties Size Mode Property default is Clip you can change to Stretch
bull Right click on picture bull Left click on Properties
- Clip ndash If the picture cannot fit into the space allowed for it it is clipped to fit - Stretch ndash The picture is sized to fit the space allowed keeping its heightwidth ratio
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
QUERY WIZARD
Find Duplicates
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
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 bull simple looks like the Table datasheet view bull crosstab is similar to a spreadsheet with summary information inserted into the intersection of each row and column bull find duplicates lists the records which have duplicate values in any specified field bull find unmatched compares two tables and identifies records which do not have a match in a related table
Using Query Wizard From Database window bull Click Query Tab bull Click New bull Select Query type from list (OK) bull Follow prompts - select Tables Queries (Next) - select Fields (Next) - create a Title - click Finish
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Sort sequence Selection criteria
DESIGN VIEW
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
SELECTION QUERIES
A selection query searches for data that meet your selection specifications and creates a Record set 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 bull table(s) from which you want to extract data bull fields you want displayed bull calculations you want performed on those displayed fields bull ranges of data bull sort sequences for various fields
Query Design bull click the Query Tab bull click New bull click Design View bull 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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
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 andor query for your source the selected object will be placed into the top pane of the Query window bull Click an object in the Show Table (table or query) bull Click Add bull Repeat these two steps for each object that is needed bull Click Close
Select Fields bull 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 bull Specify selection criteria (see next page) andor sort sequence for each of the selected fields
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
CRITERIA EXPRESSIONS
Selection criteria
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
COMMON EXPRESSIONS Criteria Expression Shows records where France Value is France Not France Value is not France In (France Germany Italy) Value is France Germany or Italy
ltM Value begins with letters A-L gt=M Value begins with letters M-Z 100 Numeric value is 100 lt=20 Numeric value is less than or equal to 20 Date() Date is todayrsquos date Now Current date and time gt=1198 Date is on or after 1198 Between 1198AND123198 Date is in the year 1998 2 Date is in the month of February
Null The field does not contain a value
Is Not Null The field contains a value
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
EXPRESSIONS FOR FIELD ROW
Names Table Field(Value) LastName(Smith)
FirstName(Ruth) Expression NameLastNameamp ldquo rdquoampFirstNameResult Name Smith Ruth
AddressTable Field(Value) Street(101 E 34th St)
City(New York) State(NY) ZIP(10016)
Expression Addr Streetampldquo rdquoampCityampldquo rdquoampStateamp ldquo rdquo ampZIP Result Addr 101 E 34th St New York NY 10016
Calculations Table Field(Value) DateLastClass(06041998) Expression DaysUntilY2K 01012000-DateLastClassResult DaysUntilY2K 576
Expression Examples
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
SUMMATION QUERIES
Click on Totals icon
Totals row
RUN
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
SUMMATION QUERIES
Queries provide either detail information or summation information about the data in your Tables For examplebull Detail ndash Display information from an individual table rowbull Summary ndash Show a count of the number of checks written to a particular
Payee
To obtain totals or ldquogrouped byrdquo category information you must add the TOTALS row to your Query design grid bull Click the Totals button on the toolbar
bull The Totals Row is displayed underneath the Table row on your design grid and the phrase ldquoGroup Byrdquo appears in the Total cell for each Field
bull You have several options for calculations Sum Average Count Last etc
In the example on the opposite page Access will group expenses together by ldquoPay Tordquo show the First check number paid in each group and also count the number of checks written in each ldquoPay Tordquo category
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
FILTERS Filter by Selection
Based on a Table
Select value to beused as criterion
Filtered data
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
Filter by Form
Based on a Query
Enter selection criteria
Filtered data
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
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
Applying a Filter There are two ways to filter Filter by Selection ndashspecify one criterion by clicking on a value you are looking for within a
datasheet or form bull open a table bull click on a specific value in any field on the table bull click on the Filter by Selection icon in the toolbar bull Access will display all rows having the same value as the field you selected
Filter by Form ndash specify both criteria and conditions in a blank version of your table bull open a table bull click on the Filter by Form icon in the toolbar bull 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 bull Access will display all rows having the same value(s)
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
bull 622 Features ndash 6221 State the relationship between attribute (field)
row (record) and relation (file)ndash 6222 Define the primary key and foreign key ndash 6223 State the importance of the primary key ndash 6224 Differentiate between the primary key and
foreign key ndash 6225 State the importance of relationship between
the primary key and foreign key
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
60 INFORMATION SYSTEMS
62 SOFTWARE2 period (80 minutes)
consist of students exploring the MS Access in Comp Lab
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
hellipcontinue from the last project
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
REPORTS
Design View
Unbound Controls
Bound Controls
Calculation
Print Preview Headers
Detail
Footers
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
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
bull Report header Appears once at the beginning of a report it is printed on the first page before the page header bull Report footer Appears once at the end of the report it is printed on the last page before the page footer bull Page header Appears at the top of every page bull Page footer Appears at the bottom of every page bull Group header Appears at the beginning of a new group of records bull Group footer Appears at the end of a group of records bull Detail Contains the main body of a reportrsquos data controls in this section repeat for each record of the database
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
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 bull bound controls are tied to a field in an underlying table or query
bull unbound controls do not have a data source they display fixed data (information lines pictures)
bull calculated controls use expressions as the source of data
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
REPORT WIZARDS
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
REPORT WIZARDSThe 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 bull Click Reports Tab bull Click New bull Select Report Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select grouping levels (Next) - specify sorting sequence (Next) - select layout and orientation (Next) - click Finish
Grouping levels allow you to keep together data belonging to a specific group eg all customers with the same Zip code
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
CHART WIZARD
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
CHART WIZARDCharts and graphs can be created using Report Wizard Access offers a variety of chart styles bull bar charts bull pie charts bull line charts bull area charts bull 3-D charts
Using the Chart Wizard From Database window bull Click Reports Tab bull Click New bull Select Chart Wizard from list (OK) bull Follow prompts - choose a Table or Query (OK) - select fields (Next) - select type of chart (Next) - specify layout (eg x and y axis fields) (Next) - specify a title for the chart
(Finish)
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
VIEWING THE REPORT
View
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
VIEWING THE REPORT Preview the report in design view
bull Click down arrow on the View icon
bull Print Preview shows the entire report you must use the scroll bars to view left and right and page down
bull 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 bull click the Reports tab bull click the report you want to print bull click the Printer icon
Note Always preview your Report before printing
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
CLOSING ACCESS
Object Window Close Button
Access Application Close Button
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-
CLOSING ACCESS
Closebull 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 bull Click Close icon for the database bull Click Close icon for the application
- 60 INFORMATION SYSTEMS
- data
- Slide Number 3
- DATABASE MANAGEMENT SYSTEM
- Slide Number 5
- Slide Number 6
- Benefits of using database
- Example of DBMS
- So thatrsquos all
- Using Microsoft Access
- What is Microsoft Access
- Why choose MS-Access over SPSS Excel
- Why choose MS-Access over other DBMS systems
- MS Acess
- MS Access Environment
- Slide Number 16
- Field
- Record
- File
- Slide Number 20
- Thatrsquos all for now
- Slide Number 22
- 60 INFORMATION SYSTEMS
- Using Microsoft Access
- Slide Number 25
- Slide Number 26
- Slide Number 27
- Slide Number 28
- Slide Number 29
- Slide Number 30
- Slide Number 31
- Slide Number 32
- Slide Number 33
- Slide Number 34
- Slide Number 35
- Slide Number 36
- Slide Number 37
- Slide Number 38
- Slide Number 39
- Slide Number 40
- Slide Number 41
- Slide Number 42
- Slide Number 43
- Slide Number 44
- Slide Number 45
- Slide Number 46
- Slide Number 47
- Slide Number 48
- Slide Number 49
- Slide Number 50
- Slide Number 51
- Slide Number 52
- Slide Number 53
- Slide Number 54
- Slide Number 55
- Slide Number 56
- Slide Number 57
- Slide Number 58
- Slide Number 59
- Slide Number 60
- Slide Number 61
- Slide Number 62
- Slide Number 63
- Slide Number 64
- Slide Number 65
- Slide Number 66
- Slide Number 67
- Slide Number 68
- Slide Number 69
- Slide Number 70
- Slide Number 71
- Slide Number 72
- Slide Number 73
- Slide Number 74
- Slide Number 75
- Slide Number 76
- 60 INFORMATION SYSTEMS
- hellipcontinue from the last project
- Slide Number 79
- Slide Number 80
- Slide Number 81
- Slide Number 82
- Slide Number 83
- Slide Number 84
- Slide Number 85
- Slide Number 86
- Slide Number 87
- Slide Number 88
- Slide Number 89
-