INTRODUCTION TO DATABASE USING MICROSOFT ACCESS 2013 Part 5.1 November 16, 2014.

Slides:



Advertisements
Similar presentations
MS-Access XP Lesson 1. Introduction to MS-Access Database Management System Software (DBMS) Store data in databases Database is a collection of table.
Advertisements

Validation Checks that the data entered is sensible.
1 Chapter 1 & 2 Relational Databases and Queries CS101 WVU.
 Microsoft Access is one of two primary database offering from Microsoft.  Access is a network/desktop-based database.  Advantage: It is easy to use.
1 Chapter 9 - Formatted Input/Output Outline 9.1Introduction 9.2Streams 9.3Formatting Output with printf 9.4Printing Integers 9.5Printing Floating-Point.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
CVEV 118/698 Databases Lecture 2 Prof. Mounir Mabsout Elsa Sulukdjian Walid El Asmar.
Chapter 9 Formatted Input/Output Acknowledgment The notes are adapted from those provided by Deitel & Associates, Inc. and Pearson Education Inc.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Chapter 9 - Formatted Input/Output Outline 9.1Introduction.
JavaScript, Third Edition
Tutorial 5 Creating Advanced Queries and Enhancing Table Design
With Microsoft Access 2010 © 2011 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Access.
Entering Data in Excel. Entering numbers, text, a date, or a time n 1Click the cell where you want to enter data. n 2Type the data and press ENTER or.
S511 Session 6, IU-SLIS 1 DB Implementation: MS Access Tables.
Microsoft Access Tables Birgül Kutlu Bayraktar. TERMS A database is a collection of related information. An object is a competition in the database such.
Microsoft Access 2000 Creating Tables and Relationships.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 1 1. Chapter 2: Relational Databases and Multi-Table Queries Exploring Microsoft Office.
Introduction to Access By Mary Ann Chaney and Alicia Harkleroad.
With Microsoft Office 2007 Intermediate© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Office 2007 Intermediate.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Streams Streams –Sequences of characters organized.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Chapter 9 - Formatted Input/Output Outline 9.1Introduction.
With Microsoft Access 2007 Volume 1© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Access 2007 Volume 1 Chapter.
XP New Perspectives on Microsoft Access 2002 Tutorial 51 Microsoft Access 2002 Tutorial 5 – Enhancing a Table’s Design, and Creating Advanced Queries and.
Chapter 9 Formatted Input/Output. Objectives In this chapter, you will learn: –To understand input and output streams. –To be able to use all print formatting.
Access 2000 Part 1 Introduction to Access Agenda Starting Access. Creating Tables. Working with Tables. Setting Field Properties.
Microsoft Access Intro Class 2 Designing Databases and Tables.
Chapter 9 Formatted Input/Output Associate Prof. Yuh-Shyan Chen Dept. of Computer Science and Information Engineering National Chung-Cheng University.
 Pearson Education, Inc. All rights reserved Formatted Output.
 2005 Pearson Education, Inc. All rights reserved Formatted Output.
© Paradigm Publishing, Inc Access 2010 Level 2 Unit 1Advanced Tables, Relationships, Queries, and Forms Chapter 1Designing the Structure of Tables.
 A database is a collection of data that is organized so that its contents can easily be accessed, managed, and updated. What is Database?
Microsoft Access 2010 Building and Using Queries.
CSC 162 Visual Basic I Programming. Randomizing and Formatting Randomizing Formatting –User-Defined Formats –Named Numeric Formats.
CHƯƠNG 3 Finding, Filtering, and Formatting Data.
Copyright 2007, Paradigm Publishing Inc. BACKNEXTEND 1-1 LINKS TO OBJECTIVES Design Tables and Fields Design Tables and Fields Data Types Field Size Property.
Access Chapter 2: Relational Database Objectives Design data Create tables Understand table relationships Understand data types, key, & field properties.
Presented By: Gail Rose-Innes Camps Bay High School ICT & CAT Department Microsoft Access 2010.
Microsoft Office Illustrated Introductory, Premium Edition Using Tables and Queries.
WHAT IS A DATABASE? A DATABASE IS A COLLECTION OF DATA RELATED TO A PARTICULAR TOPIC OR PURPOSE OR TO PUT IT SIMPLY A GENERAL PURPOSE CONTAINER FOR STORING.
Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 3 Variables, Constants, Methods, and Calculations.
Databases,Tables and Forms Access Text by Grauer Chapters 1 & 2.
A Skills Approach Access 2010 Working with Tables © 2012 The McGraw-Hill Companies, Inc. All rights reserved Chapter 2.
Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.
Chapter 5 Working with Multiple Worksheets and Workbooks
Microsoft Office Excel 2013 Expert Microsoft Office Excel 2013 Expert Courseware # 3254 Lesson 4: Custom Formatting and What-If Analysis.
Relational Database Techniques
 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
Lesson 13 Databases Unit 2—Using the Computer. Computer Concepts BASICS - 22 Objectives Define the purpose and function of database software. Identify.
Lesson 4.  After a table has been created, you may need to modify it. You can make many changes to a table—or other database object—using its property.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 5 1 Microsoft Office Access 2003 Tutorial 5 – Enhancing a Table’s Design.
Microsoft Access Prepared by the Academic Faculty Members of IT.
Getting Started in Access 1 Using an existing Database Database Window Table Design View Parts of a Table Views in Access Navigating in Access Entering.
MS Access: Defining Data Entry Rules Instructor: Vicki Weidler Assistant: Joaquin Obieta.
VOCAB REVIEW. A field that can be computed from other fields Calculated field Click for the answer Next Question.
COMPUTER SKILLS MS-ACCESS. Introduction Access is a piece of software known as a database management system. At its most basic level, it can be used to.
MICROSFTACCESS tables. DATA TYPES Field TypeWhat It Holds Short Text Text up to 255 characters long (including spaces and punctuation). Use a Text field,
28 Formatted Output.
DB Implementation: MS Access Tables
Building Tables & Defining Relationships
Unit 16 – Database Systems
Databases part 2 – field properties
DB Implementation: MS Access Tables
Chapter 3 The DATA DIVISION.
MS ACCESS.
Microsoft Access Validation Rules, Table Relationships And
Chapter 2 Design Table and Form.
Lecture 2 Lecturer: awdang aziz MS access
C How to Program, 6/e © by Pearson Education, Inc. All Rights Reserved.
Chapter 2 Design Table and Form.
Presentation transcript:

INTRODUCTION TO DATABASE USING MICROSOFT ACCESS 2013 Part 5.1 November 16, 2014

SETTING FIELD PROPERTIES

FIELD SIZE Enter a value from 1 to 255. Text fields can range from 1 to 255 characters. For larger text fields, use the Memo data type. Byte — Use for integers that range from 0 to 255. Storage requirement is 1 byte. Integer — Use for integers that range from -32,768 to 32,767. Storage requirement is 2 bytes. Long Integer — Use for integers that range from -2,147,483,648 to 2,147,483,647. Storage requirement is 4 bytes. Single Use for numeric floating point values that range from -3.4 x to 3.4 x and up to seven significant digits. Storage requirement is 4 bytes. Double Use for numeric floating point values that range from x to x and up to fifteen significant digits. Storage requirement is 8 bytes. Replication ID Use for storing a globally unique identifier required for replication. Storage requirement is 16 bytes. Note that replication is not supported using the.accdb file format. Decimal Use for numeric values that range from x to x Storage requirement is 12 bytes.

FORMAT Determines the way that the field appears when it is displayed or printed in datasheets or in forms or reports that are bound to the field.

INPUT MASK Displays editing characters to guide data entry.

CAPTION The label text that is displayed for this field by default in forms, reports, and queries. If this property is empty, the name of the field is used. Any text string is allowed.

DEFAULT VALUE Automatically assigns the specified value to this field when a new record is added.

VALIDATION RULE Supplies an expression that must be true whenever you add or change the value in this field.

VALIDATION TEXT Enter a message to display when a value that is entered violates the expression in the Validation Rule property.

REQUIRED Requires that data be entered in the field.

SMART TAGS Attaches a smart tag to the field.

TEXT ALIGN Specifies the default alignment of text within a control.

UNICODE COMPRESSION Compresses text that is stored in this field when less than 4,096 characters are stored.

ALLOW ZERO LENGTH Allows entry (by setting to Yes) of a zero-length string ("") in a Hyperlink, Text, or Memo field.

APPEND ONLY Determines whether to track field value changes.

INDEXED Specifies whether the field has an index.

NEW VALUES Determines whether an AutoNumber field increments with each new value or uses random numbers.

DECIMAL PLACES Specifies the number of decimal places to use when displaying numbers.

IME MODE Controls the conversion of characters in East Asian versions of Windows.

IME SENTENCE MODE Controls the conversion of characters in East Asian versions of Windows.

SHOW DATE PICKER Specifies whether to show the Date Picker control.

FORMAT FOR DATA FIELDS

FORMAT FOR NUMBER AND CURRENCY FIELDS

If you don't specify a custom format for numeric and currency values, Access displays numbers in the General Number format and currencies in the Currency format. To create a custom format, use the formatting characters shown in the following table. You can also specify a color in which you want the number or currency.

CharacterDescription #Used to display a digit. Each instance of the character represents a position for one number. If no value exists in a position, Access displays a blank space. Also, can be used as a placeholder. For example, if you apply the format #,### and enter a value of 45 in the field, 45 is displayed. If you enter 12,145 in a field, Access displays 12,145 — even though you defined only one placeholder to the left of the thousands separator. 0Used to display a digit. Each instance of the character represents a position for one number. If no value exists in a position, Access displays a zero (0). Thousands and decimal separatorsUsed to indicate where you want Access to place the thousands and decimal separators. Access uses the separators that are defined for your Windows regional settings.

CharacterDescription blank spaces, + - $ () Used to insert blank spaces, math characters (+ -), and financial symbols (¥ £ $) as needed anywhere in your format strings. If you want to use other common math symbols, such as slash (\ or /) and the asterisk (*), surround them with double quotation marks. Note that you can place them anywhere. \ Used to force Access to display the character that immediately follows. This is the same as surrounding a character with double quotation marks. ! Used to force the left alignment of all values. When you force left alignment, you cannot use the # and 0 digit placeholders, but you can use placeholders for text characters.

CharacterDescription * Used to force the character immediately following the asterisk to become a fill character — a character used to fill blank spaces. Access normally displays numeric data as right-aligned, and it fills any area to the left of the value with blank spaces. You can add fill characters anywhere in a format string, and when you do so, Access fills any blank spaces with the specified character. % Used as the last character in a format string. Multiplies the value by 100 and displays the result with a trailing percent sign. E+, E- –or– e+, e- Used to display values in scientific (exponential) notation. Use this option when the predefined scientific format doesn't provide sufficient room for your values. Use E+ or e+ to display values as positive exponents, and E- or e- to display negative exponents. You must use these placeholders with other characters.

CharacterDescription "Literal text" Use double quotation marks to surround any text that you want users to see. [color] Used to apply a color to all values in a section of your format. You must enclose the name of the color in brackets and use one of these names: black, blue, cyan, green, magenta, red, yellow, or white.

FORMAT FOR TEXT AND MEMO FIELD

The Text and Memo data types do not accept predefined formats. The Text data type accepts only custom formats, the Memo data type accepts both custom and Rich Text formatting. Typically, you apply custom formats to Text and Memo data types to make the table data easier to read. For example, if you use a Web form to collect credit card numbers, and you store those numbers without spaces, you can use a custom format to add the appropriate spaces to make the credit card numbers easier to read. Custom formats for the Text and Memo data types allow only two format sections in a string. The first section of a format string controls the appearance of text, and the second section displays empty values or zero-length strings. If you don't specify a format, Access left aligns all text in datasheets.

Used to display any available character for its position in the format string. If Access places all characters in the underlying data, any remaining placeholders appear as blank spaces. & Used to display any available character for its position in the format string. If Access places all characters in the underlying data, any remaining placeholders display nothing. ! Used to force placeholder characters to be filled from left to right instead of right to left. You must use this character at the start of any format string. < Used to force all text to lowercase. You must use this character at the beginning of a format string, but you can precede it with an exclamation point (!). > Used to force all text to uppercase. You must use this character at the beginning of a format string, but you can precede it with an exclamation point (!).

CharacterDescription * When used, the character immediately after the asterisk (*) becomes a fill character — a character used to fill blank spaces. Access normally displays text as left-aligned and fills any area to the right of the value with blank spaces. You can add fill characters anywhere in a format string. When you do so, Access fills any blank spaces with the specified character. Blank space, + - $ () Used to insert blank spaces, math characters (+ -), financial symbols ($ ¥ £), and parentheses as needed anywhere in your format strings. If you want to use other common math symbols, such as slash (\ or /) and the asterisk (*), surround them with double quotation marks — note that you can place these characters anywhere in the format string. "Literal text" Use double quotation marks to surround any text that you want displayed to users.

CharacterDescription \ Used to force Access to display the character that immediately follows. This is the same as surrounding a character with double quotation marks. [color] Used to apply a color to all values in a section of your format. You must enclose the name in brackets and use one of these names: black, blue, cyan, green, magenta, red, yellow, or white.

FORMAT FOR DATE AND TIME FIELD

If you don't specify a predefined or custom format, Access applies the General Date format — m/dd/yyyy h:nn:ss AM/PM. Custom formats for the Date/Time fields can contain two sections — one for the date and another for time — and you separate the sections with a semicolon. For example, you can re-create the General Date format as follows: m/dd/yyyy;h:nn:ss.

CharacterDescription Date separator Used to control where Access places the separator for days, months, and years. Access uses the separator defined in your Windows regional settings. cUsed to display the general date format. d or dd Used to display the day of the month as one or two digits. For one digit, use a single placeholder. For two digits, use two placeholders. ddd Used to abbreviate the day of the week to three letters ddddUsed to spell out all days of the week. dddddUsed to display the Short Date Format ddddddUsed to display the Long Date Format w Used to display the number of the day of the week. m or mm Used to display the month as either a one-digit or two-digit number

CharacterDescription mmm Used to abbreviate the name of the month to three letters. mmmmUsed to spell out all month names. q Used to display the number of the current calendar quarter (1-4). yUsed to display the day of the year (1-366). yyUsed to display the last two digits of the year. yyyy Used to display all digits in a year in the range Time separator Used to control where Access places the separator for hours, minutes, and seconds. Access uses the separator defined in your Windows regional settings. h or hhUsed to display the hour as one or two digits. n or nnUsed to display minutes as one or two digits. s or ssUsed to display seconds as one or two digits. tttttUsed to display the Long Time format.

CharacterDescription AM/PM Used to display 12-hour clock values with a trailing AM or PM. Access relies on the system clock in your computer to set the value. A/P or a/p Used to display 12-hour clock values with a trailing A, P, a, or p. Access relies on the system clock in your computer to set the value. AMPM Used to display 12-hour clock values. Access uses the morning and afternoon indicators specified in your Windows regional settings. Blank space, + - $ () Used to insert blank spaces, math characters (+ -), financial symbols ($ ¥ £), and parentheses as needed anywhere in your format strings. If you want to use other common math symbols, such as slash (\ or /) and the asterisk (*), surround them with double quotation marks. Note that you can place them anywhere. \ Used to force Access to display the character that immediately follows. This is the same as surrounding a character with double quotation marks.

CharacterDescription * Used to force the character immediately following the asterisk to become a fill character — a character used to fill blank spaces. Access normally displays text as left aligned and fills any area to the right of the value with blank spaces. You can add fill characters anywhere in a format string. When you do so, Access fills any blank spaces with the specified character. "Literal text" Use double quotation marks to surround any text that you want users to see. [color] Used to apply a color to all values in a section of your format. You must enclose the name in brackets and use one of these names: black, blue, cyan, green, magenta, red, yellow, or white.

VALIDATION RULE

WHAT IS VALIDATION RULE A validation rule limits or controls what users can enter in a table field or a control (such as a text box) on a form.

SYNTAX FOR CREATING A VALIDATION RULE OperatorFunctionExample NOT Tests for converse values. Use before any comparison operator except IS NOT NULL. NOT > 10 (the same as <=10). ININ Tests for values equal to existing members in a list. Comparison value must be a comma- separated list enclosed in parentheses. IN ("Tokyo","Paris","Moscow") BETWEEN Tests for a range of values. You must use two comparison values — low and high — and you must separate those values with the AND separator. BETWEEN 100 AND 1000 (the same as >=100 AND <=1000) LIKE Matches pattern strings in Text and Memo fields. LIKE "Geo*"

OperatorFunctionExample IS NOT NULL Forces users to enter values in the field. This is the same as setting the Required field property to Yes. However, when you enable the Required property and a user fails to enter a value, Access displays a somewhat unfriendly error message. Typically, your database is easier to use if you use IS NOT NULL and enter a friendly message in the Validation Text property. IS NOT NULL AND Specifies that all the data that you enter must be true or fall within limits that you specify. >= #01/01/2007# AND <=#03/06/2008# Note You can also use AND to combine validation rules. For example: NOT "UK" AND LIKE "U*". OR Specifies that one or more pieces of data can be true. January OR February

OperatorFunctionExample <Less than. <=Less than or equal to. >Greater than. >=Greater than or equal to. =Equal to. <>Not equal to.

EXAMPLES OF VALIDATION RULES Validation ruleValidation text <>0Enter a nonzero value. >=0 Value must be zero or greater.-or- You must enter a positive number. 0 or >100Value must be either 0 or greater than 100. BETWEEN 0 AND 1 Enter a value with a percent sign. (For use with a field that stores number values as percentages). <#01/01/2007#Enter a date before >=#01/01/2007# AND <#01/01/2008#Date must occur in <Date()Birth date cannot be in the future. StrComp(UCase([LastName]), [LastName],0) = 0 Data in a field named LastName must be uppercase. >=Int(Now())Enter today's date.

Validation ruleValidation text M Or FEnter M for male or F for female. LIKE OR OR Enter a valid.com,.net, or.org address. [RequiredDate]<=[OrderDate]+30 Enter a required date that occurs no more than 30 days after the order date. [EndDate]>=[StartDate]Enter an ending date on or after the start date.

VALIDATION RULE REFERENCE The following tables provide reference information for validation rules, including the syntax that the most common rules use, links to information about using wildcard characters in your rules, and examples that you can adapt for use with your data.