FOR-IAN V. SANDOVAL Presented by: Computer Instructor Next
Jan 15, 2015
FOR-IAN V. SANDOVAL
Presented by:
Computer InstructorNext
Chapter 1 - Review of Database Managers SoftwareChapter 2 - Getting Started with Access
Chapter 3 - Touring the Access DatabaseChapter 4 - Planning and Creating a Custom
DatabaseChapter 5 - Working with FieldsChapter 6 - Working with TablesChapter 7 - Querying a DatabaseChapter 8 - Creating ReportsChapter 9 - Creating FormsChapter 10 - Improving the Appearance of Forms
& ReportsNextBack
Chapter 11 - Inserting Information from Other Sources
Chapter 12 - Working on the World Wide WebChapter 13 - Managing a DatabaseChapter 14 - Customizing Access
Chapter 15 - Working with VBA
Database Managers Software are programs for organizing and managing data and information.
Examples:
FoxPro, Fox Base, Cliffers, D-base (I, II, III & IV) Microsoft Access (97/2000/2003/2007)
Database is rather technical word for a collection of information that is organized as a list. This definition might be oversimplified, but whenever you use or make a a list of information – names, addresses, products, customers, or invoice – you using a database. A database that you store on your computer however, is much more flexible and powerful than a simple list you keen of paper, in your card file or in your address book.
Microsoft Access is a database program that allows you to:• Store an almost limitless amount of information• Retrieve information based on selection criteria you specify.• Create forms that make it easier to enter information.• Generate meaningful and insightful reports that can combine data, text, graphics & other objects.• Share information easily over the Web.
Application Icon
Format DatabaseToolbar
Application Name Menu Bar Title Bar Database Toolbar
Task Pane
Status Bar Switch Board
Database Window
List of Objects
Groups Bar
Objects Bar
Database WindowToolbar
Database ObjectsDatabase Objects DescriptionDescription
TablesTables Grids that store related Grids that store related information such as a list of information such as a list of customer addressescustomer addresses
QueriesQueries A question you ask a database A question you ask a database to help locate specific to help locate specific informationinformation
FormsForms A window that is designed to A window that is designed to help you enter information help you enter information easily and accuratelyeasily and accurately
ReportsReports Summaries of information that Summaries of information that are designed to be readable are designed to be readable and accessibleand accessible
Database ObjectsDatabase Objects DescriptionDescription
PagesPages Separate files outside the Separate files outside the Access database in HTML Access database in HTML format that can be placed on format that can be placed on the Web to facilitate sharing the Web to facilitate sharing data with the world wide webdata with the world wide web
MacrosMacros Stored series of commands Stored series of commands that carry out an actionthat carry out an action
ModulesModules Programs you can write using Programs you can write using Microsoft Visual BasicMicrosoft Visual Basic
FILE MENU VIEW MENUEDIT MENU
INSERT MENU RECORDS MENUFORMAT MENU
TOOLS MENU HELP MENUWINDOW MENU
TASK PANE
DATABASE TOOLBAR
FORMATTING DATABASE TOOLBAR
WEB TOOLBAR
Tabs
Text box
Command Button
DropdownList Box
DropdownArrows
Check Box
Option Button
When you are working with an existing database, however you don’t need to worry about the complexities of database design. You just need to know how to get around the database design. The tasks you are likely to perform with an existing database include entering and viewing data or subsets of data, creating and printing reports, and working efficiently with all the windows in front of you.
• Not all databases fit on any of the Wizards’ predefined choices, you may need to create database “from scratch”.
• Careful Planning involves:1. Determine the purpose and scope of your database
2. Decide what tables your database will contain and the contents of those table will be
3. Define how data in one table is related to data in another table
• What kind of data are you collecting?• What kind of data are you entering?• How are the data values are related to one another?• Can your data be organized into separate smaller groups?• What kind of safeguards can you create to ensure that errors do not creep into your data?
• When you create a table decide what fields to include and the appropriate format for those fields.• Choosing the correct data types helps you manage your data and reduces the possibility of data-entry errors.
• Primary keys are those fields whose values uniquely identify each record in the table, although primary keys are not required, their use is one way of removing the possibility of duplicate records existing within the table.
• Specifying Common Fields – a common field existing in two or more tables; allowing you to match records from one table with records in the other tables. • When the Primary Key as a common field, it is called a foreign key in the second table.• Three types of relationships
one-to-one, one-to-many, and many-to-many.
• Referential Integrity, a set of rules that control how you can delete or modify data between related tables. It protects you from erroneously changing data in a primary table required by a related table.• Apply referential integrity when:
a. the common field is the primary table’s primary keyb. the related fields have the same format
c. both tables belong to the same database
• Referential integrity forces you to do:
a. before adding a record to a related table, a matching record must already exist in the primary table b. the value of the primary key in the primary table cannot be changed if matching records exists in a related tablec. a record in the primary key table cannot deleted if the matching records exist in a related table
• Methods for Creating A Tablea. Datasheet Viewb. Design Viewc. Table Wizardd. Importinge. Linking
• The important part of creating database is field design.
• Designing fields allow you to:
1. Assign a data type so the field accepts and display data in the appropriate format.2. Include input masks that guide users during data entry.
3. Specify whether data must be entered into certain fields.
4. Include a default data value for a field.
5. Include validation checks to ensure that correct data is entered.6. Accommodate data whose values are taken from the lookup lists.
Field names can contain up to 64 characters and can include numbers and spaces.
Data TypeData Type DescriptionDescription
Text (default)Text (default) Text or combination of text and Text or combination of text and numbers, as well as numbers that numbers, as well as numbers that don’t require calculations. Limited don’t require calculations. Limited to 255 characters.to 255 characters.
MemoMemo A lengthy text or combination of A lengthy text or combination of text and numbers. Limited to text and numbers. Limited to 64,000 characters.64,000 characters.
NumberNumber Numeric data used in Numeric data used in mathematical calculations.mathematical calculations.
Data TypeData Type DescriptionDescription
Date / TimeDate / Time Date and time values for the years Date and time values for the years 2000 through 9999.2000 through 9999.
CurrencyCurrency Currency values and numeric data Currency values and numeric data used in mathematical calculations used in mathematical calculations involving data with one to four involving data with one to four decimal places. Values are decimal places. Values are accurate to 15 digits on the left accurate to 15 digits on the left side of the decimal separator.side of the decimal separator.
AutoNumberAutoNumber A unique sequential number A unique sequential number (incremented by 1) or random (incremented by 1) or random number Access assigns whenever number Access assigns whenever you add a new record to a table.you add a new record to a table.
Data TypeData Type DescriptionDescription
Yes / NoYes / No A field containing only one of two A field containing only one of two values (i.e. Yes/No, True/False, values (i.e. Yes/No, True/False, On/Off)On/Off)
OLE ObjectOLE Object An object (such as a Microsoft An object (such as a Microsoft Excel Spreadsheet) linked to or Excel Spreadsheet) linked to or embedded in an Access table.embedded in an Access table.
HyperlinkHyperlink A link that when clicked takes the A link that when clicked takes the user to another file, a location in a user to another file, a location in a file, or a sit in an Access Tablefile, or a sit in an Access Table
Lookup Lookup WizardWizard
A wizard that helps you to create a A wizard that helps you to create a field whose values are chosen field whose values are chosen from the values in another table, from the values in another table, query or list of values.query or list of values.
TEXT FIELD PROPERTIESTEXT FIELD PROPERTIES
FieldField ActionAction
Field SizeField Size Specify the maximum number of Specify the maximum number of characters (up to 255) that can be characters (up to 255) that can be entered in the field.entered in the field.
FormatFormat Specify how the data for the field Specify how the data for the field will appear on the screen.will appear on the screen.
Input MaskInput Mask Specify a format or pattern in Specify a format or pattern in which data must be entered.which data must be entered.
FieldField ActionAction
Caption Caption Enter a label for the field when Enter a label for the field when used on a form. If you don’t enter a used on a form. If you don’t enter a caption, Access uses the field caption, Access uses the field name as the label.name as the label.
Default ValueDefault Value Specify a value that Access enters Specify a value that Access enters automatically.automatically.
Validation Validation RuleRule
Enter expression that limits the Enter expression that limits the values that can be entered in the values that can be entered in the field.field.
Validation TextValidation Text Enter an error message that Enter an error message that appears when a prohibited by the appears when a prohibited by the validation rule is entered.validation rule is entered.
FieldField ActionAction
RequiredRequired Indicate whether data entry is Indicate whether data entry is required.required.
Allow Zero Allow Zero LengthLength
Specify if field allows zero length Specify if field allows zero length text strings.text strings.
IndexedIndexed Indicate whether Access will keep Indicate whether Access will keep an index of field values.an index of field values.
Unicode Unicode CompressionCompression
Indicate whether you want Access Indicate whether you want Access to save space if only plain text is to save space if only plain text is entered.entered.
NUMERIC FIELD SIZESNUMERIC FIELD SIZES
Field SizeField Size RangeRange StorageStorage
ByteByte Integers from 0 to 255Integers from 0 to 255 1 byte1 byte
IntegerInteger Integers from -32,768 to Integers from -32,768 to 32,76732,767
2 bytes2 bytes
Long IntegerLong Integer Integers for -2,147,483,648 Integers for -2,147,483,648 to 2,147,483647to 2,147,483647
4 bytes4 bytes
SingleSingle From -3.402823E38 to -From -3.402823E38 to -1.401298E-45 (negative 1.401298E-45 (negative values) andvalues) and
4 bytes4 bytes
Field SizeField Size RangeRange StorageStorage
From 1.401298E-45 to From 1.401298E-45 to 3.402823E38 (positive 3.402823E38 (positive values)values)
DoubleDouble From -1.797693E308 to -From -1.797693E308 to -4.940656E-324 (negative 4.940656E-324 (negative values) and 1.797693E308 values) and 1.797693E308 to 4.940656E324 (positive to 4.940656E324 (positive values)values)
8 bytes8 bytes
Replication Replication IDID
Values used to establish Values used to establish unique identifiersunique identifiers
16 bytes16 bytes
GENERAL AND TEXT FORMATTING SYMBOLSGENERAL AND TEXT FORMATTING SYMBOLS
SymbolSymbol DescriptionDescription DataData FormatFormat DisplayDisplay
!! Left alignLeft align 321321 !! 321321
<< LowercaseLowercase TodayToday << todaytoday
>> UppercaseUppercase TodayToday << TODAYTODAY
““ABC”ABC” Display quoted Display quoted text as literaltext as literal
2020 & “ lbs.”& “ lbs.” 20 lbs.20 lbs.
(space)(space) Display a blank Display a blank spacespace
1616 & “oz.”& “oz.” 16 oz.16 oz.
SymbolSymbol DescriptionDescription DataData FormatFormat DisplayDisplay
\\ Display next Display next character as character as literalliteral
1010 &\k&\k 10k10k
@@ Character is Character is requiredrequired
22177112217711 @@@-@@@-@@@@@@@@
221-221-77117711
&& Character not Character not requiredrequired
MrMr &\.&\. Mr.Mr.
** Fill available Fill available space with next space with next charactercharacter
HelloHello &*!&*! Hello!!!!Hello!!!!
[color][color] Display values Display values in colorin color
For-IanFor-Ian [gray][gray] For-IanFor-Ian
NUMERIC AND CURRENCY FORMATTING NUMERIC AND CURRENCY FORMATTING SYMBOLSSYMBOLS
SymbolSymbol DescriptionDescription DataData FormatFormat DisplayDisplay
## Display a digit Display a digit or nothingor nothing
1515 ## 1515
00 Display a digit Display a digit or 0or 0
20.120.1 #.00#.00 20.1020.10
.. Display a Display a decimal decimal separatorseparator
1515 #.#. 15.15.
SymbolSymbol DescriptionDescription DataData FormatFormat DisplayDisplay
,, Display Display thousand thousand separatorseparator
2482924829 #,####,### 24,82924,829
$$ Display the Display the literal character, literal character, “$”“$”
19.919.9 $#.00$#.00 $19.00$19.00
%% Multiple the Multiple the value by 100 value by 100 and append a and append a percent symbolpercent symbol
0.950.95 #%#% 95%95%
E, E+, E, E+, e-, e+e-, e+
Scientific Scientific NotationNotation
284121284121 #.00E+#.00E+0000
284E+0284E+055
PRE-DEFINED DATE FORMATSPRE-DEFINED DATE FORMATS
FormatFormat DisplayDisplay
General DateGeneral Date 4/5/08 5:42:25 PM4/5/08 5:42:25 PM
Long DateLong Date Saturday, April 5, 2008Saturday, April 5, 2008
Medium DateMedium Date 5-Apr-085-Apr-08
Short DateShort Date 4/4/084/4/08
Long TimeLong Time 5:34:23 PM5:34:23 PM
Medium TimeMedium Time 10:00 AM10:00 AM
Short TimeShort Time 14:0014:00
• Input masks allows you to control what values a database user can enter into a field. It consists of literal characters such as dots, parenthesis, and placeholder.
• Placeholder is a text character indicating where the should insert values such as the underline.
INPUT MASK SYMBOLSINPUT MASK SYMBOLS
SymbolSymbol DescriptionDescription
00 Digit 0 to 9 (required)Digit 0 to 9 (required)
99 Digit 0 to 9 (optional)Digit 0 to 9 (optional)
## Digit or spacesDigit or spaces
LL Letter A-Z (required)Letter A-Z (required)
?? Letter A-Z (optional)Letter A-Z (optional)
>> Make the following Make the following character uppercasecharacter uppercase
SymbolSymbol DescriptionDescription
AA Letter or digit (required)Letter or digit (required)
&& Any character or space Any character or space (required)(required)
CC Any character or space Any character or space (optional)(optional)
<< Make following character Make following character lowercaselowercase
• Required values means that Access refuses to accept record until you enter an acceptable value for that field area
• Default Values is a value Access uses unless a user enters a different one.
• Field caption is text displayed alongside a field to better describe it purpose and content.
• It can contain up to 2048 characters including spaces.
• An index in Access is an invisible data structure that stores the sort order of a table based on the indexed fields or fields.
• It helps you locate and sort information quickly, especially in a very large table.
• When you need explicit control over data entered in a field, such as range of numbers or dates.
• You can reinforce a validation rule, which causes Access to test values a user enters in a field.• You can use the expression builder to create a validation rule by selecting the functions, constants you need for your rule from a list of options.
As you select options and type variables, the expression appears in this pane.
Double-click to display a list of Access Functions
Click to display a list of Access constants
Click to display a list of Access operators
The options for the selected group (Functions, Constants or Operators) appear in this pane.
The individual functions, constants and operators appear for the selected group in this pane.
Click a button to insert one of these frequently used functions, constants and operators.
• The Lookup Wizard helps you create a field that displays either of two kinds of lists during the data entry:
1.Lookup list that displays values looked up from the existing table or
query
2.Value list that displays a fixed set of values you enter when you create field
• If you want to create a Lookup field manually or to make changes to the field created by the wizard, you can do so by changing the values in the Lookup properties.
• You can locate records based on the text they contain with the Find feature.• You can enter and edit data more accurately with features like AutoCorrect, copy, collect, and paste, and language features.
• You can display records in either ascending or descending order based on the contents of a specific field.
• You can arrange records and columns, so your information is listed in the order you want.
• You can adjust rows and columns • You can also views subdatasheets that show groups of data related to the records in your table.• You can apply filter to change which records are displayed.
OUTLINE
6.1 SEARCHING FOR & REPLACING TEXT6.1.1 Search for Text in the Current Field6.1.2 Refine a Search6.1.3 Find & Replace Text
6.2 ENTERING DATA ACCURATELY W/ AUTOCORRECT
6.2.1 Enable AutoCorrect6.2.2 Correct Errors As You Type6.2.3 Add an AutoCorrect Entry6.2.4 Set AutoCorrect Options
6.2.6.2.
OUTLINE
6.3 EDITING TEXT6.3.1 Select Text6.3.2 Delete Text6.3.3 Insert Text6.3.4 Use Cut, Copy & Paste to Move or
Copy Text6.4 WORKING W/ LANGUAGE
6.4.1 Check the Spelling in the Table6.4.2 Customize Spelling Option6.4.3 Enable Multiple Language Editing
6.2.6.2.
OUTLINE
6.5 ARRANGING COLUMNS6.5.1 Move a Column6.5.2 Hide a Column6.5.3 Display A Hidden Column6.5.4 Freeze or Unfreeze Columns
6.6 CHANGING THE SIZE OF ROWS AND COLL\UMNS
6.6.1 Change the Column Width6.6.2 Change the Row Height
6.2.6.2.
OUTLINE
6.7 MANAGING COLUMNS IN DATASHEET VIEW
6.7.1 Insert a Column6.7.2 Rename a Column6.7.3 Delete a Column
6.8 REPAIRING ERRORS6.8.1 Enable Name AutoCorrect6.8.2 Log Name AutoCorrect Changes
6.9 MOVING TO A SPECIFIC RECORD IN A TABLE
6.9.1 Move to a Record
6.2.6.2.
OUTLINE
6.10 REARRANGING RECORDS 6.10.1 Sort Records Based on One
Field 6.10.2 Change the Order of Records Based on Multiple Fields
6.11 COPYING & PASTING RECORDS6.11.1 Copy & Paste A New Record
6.12 VIEWING SUBDATASHEET6.12.1 Display or Hide Subdatasheet6.12.2 Insert Subdatasheet in Table
6.2.6.2.
OUTLINE
6.13 USING FILTERS TO VIEW SPECIFIC RECORDS
6.13.1 Filter a Table by Selection6.13.2 Clear A Filter From A Table6.13.3 Save a Filter As A Query
6.14 CREATING COMPLEX FILTERS USING A FORM
6.14.1 Create an AND or OR Filter
6.2.6.2.
• Focus on only the information you ed by displaying only a few fields from a large table.• Apply functions and other expressions to fields to arrive at calculated results.• Add, update or delete records in tables; or create entirely new tables.• Summarize group values from one table and display the result in a table.
• Save a query definition that access will treat as a table for the purpose of crating forms and reports.• Retrieve information stored in multiple tables, even if table are not open.
OUTLINE
7.1 UNDERSTANDING THE DIFFERENT TYPE OF QUERIES
7.1.1 Select Query7.1.2 Crosstab Query7.1.3 Action Query7.1.4 Parameter Query
7.2 CREATING QUERIES IN ACCESS7.2.1 From Scratch7.2.2 From Wizard
6.2.
OUTLINE
7.3 CREATING A QUERIES USING THE QUERY WIZARD
7.3.1 Create a Simple Query Using the Query Wizard
7.4 CREATING QUERIES IN A DESIGN VIEW7.5 CHANGING THE QUERY FIELDS
7.5.1 Add a Field to a Query7.5.2 Rename a Field From a Query7.5.3 Add a Field From Another Table to
a Query
6.2.
OUTLINE
7.6 SPECIFY CRITERIA FOR A SINGLE FIELD IN A QUERY7.7 SPECIFY CRITERIA FOR MULTIPLE FIELD7.8 CREATING QUERIES WITH COMPARISON AND LOGICAL OPERATORS
7.8.1 Use a Comparison Operators7.8.2 Use the Logical Operators
6.2.
OUTLINE
7.9 PERFORMING CALCULATIONS IN A QUERIES
7.9.1 Create a Calculated Field7.10 CREATING A PARAMETER QUERY7.11 FINDING DUPLICATE FIELDS7.12 FINDING UNMATCHED RECORDS7.13 CREATE A NEW TABLE WITH A
QUERY7.14 ADDING RECORDS WITH A QUERY7.15 DELETING RECORDS IN A QUERY
6.2.
OUTLINE
7.16 CREATE A QUERY IN UPDATE RECORDS7.17 SUMMARIZIN A CROSSTAB QUERY7.18 CREATE A SQL-SPECIFIC QUERY
6.2.