INTRODUCTION TO DATABASE USING MICROSOFT ACCESS 2013 Part 5.2 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

Copyright © 2008 Pearson Prentice Hall. All rights reserved Committed to Shaping the Next Generation of IT Experts. Exploring Microsoft Office Access.
Benchmark Series Microsoft Access 2010 Level 1
Homework 1 Hints. Homework Tips (General) Go through and do the ENTIRE homework in the same time period – You will use all of the material from chap 1.
Access Lesson 2 Creating a Database
Chapter 1 Databases and Database Objects: An Introduction
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Chapter 9 Macros, Navigation Forms, PivotTables, and PivotCharts
Chapter 2 Querying a Database
Chapter 3 Maintaining a Database
Microsoft Office 2003: Advanced 1 ADVANCED MICROSOFT ACCESS Lesson 7 – Modifying Table Design.
Microsoft Access 2000 Creating Tables and Relationships.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 4 – Creating New.
® Microsoft Access 2010 Tutorial 6 Using Form Tools and Creating Custom Forms.
Chapter 2 Querying a Database MICROSOFT ACCESS 2010.
CS1100: Access Reports A (Very) Short Tutorial on Microsoft Access Report Construction Created By Martin Schedlbauer With contributions from Matthew Ekstrand-Abueg.
Verify your data entry You could use data types and field properties for adding any validation on your date: EX: Data type: number : allow the user to.
Chapter 1 Databases and Database Objects: An Introduction
Using Form Tools and Creating Custom Forms Microsoft Access 2010.
Lesson 2.  To help ensure accurate data, rules that check entries against specified values can be applied to a field. A validation rule is applied to.
Microsoft ® Access ® 2010 Training Create Queries for a New Database If a yellow security bar appears at the top of the screen in PowerPoint, click Enable.
S511 Session 7, IU-SLIS 1 DB Implementation: MS Access Forms.
With Microsoft Office 2007 Intermediate© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Office 2007 Intermediate.
Database Systems Microsoft Access Practical #1 Creating Tables Nos 215.
McGraw-Hill/Irwin The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Access 2002 Lab 2 Modifying a Table and Creating.
COMPREHENSIVE Access Tutorial 6 Using Form Tools and Creating Custom Forms.
More on Tables Open your table in design view Click here!
Microsoft Access 2010 Chapter 10 Administering a Database System.
® Microsoft Office 2013 Access Creating a Database.
Introduction to Database using Microsoft Access 2013 Part 7 November 19, 2014.
Databases,Tables and Forms Access Text by Grauer Chapters 1 & 2.
XP Chapter 2 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Building The Database Chapter 2 “It is only the farmer.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 3 BACKNEXTEND 3-1 LINKS TO OBJECTIVES Modify a Table – Add, Delete, Move Fields Modify a Table.
DB Implementation: MS Access Forms. MS Access Forms  Purpose Data entry, editing, & viewing data in tables Forms are user-friendlier to end-users than.
Access Forms and Queries. Entering Data in Your Table  You can add data to your table in Datasheet view, by typing in the columns and rows.  This.
Microsoft Access 2010 Chapter 3 Maintaining a Database.
Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.
Lesson 10 - Mail Merge and Reviewing Documents Advanced Microsoft Word.
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. Office Access 2003 Lab 2 Modifying a Table and Creating.
Introduction to a Database Defining a database Database window in Access The six items in window: Tables, Queries Forms, Reports, Macros, Modules.
1 11 Exploring Microsoft Office Access. 2 Methods of Form Creation You can create a form using: Form, Split and Multiple Form Tools Datasheet Tool Form.
Part 4 November 15,  Click MS Access 2013  On the MS Access Screen Pane, select Blank Database  Create a name that will reserve as your file.
Build a database V: Create forms for a new Access database Overview: A window into your data So far in this series of courses, you’ve built tables, relationships,
Microsoft Office 2013: In Practice Chapter 2 Using Design View, Data Validation, and Relationships Copyright © 2014 by The McGraw-Hill Companies, Inc.
CSC 240 (Blum)1 Introduction to Access CSC 240 (Blum)2 Click on the Access desktop icon or go to Start/All Programs/Microsoft Office/Microsoft Office.
1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.
AS Level ICT Data entry: Creating validation checks.
INTRODUCTION TO ACCESS. OBJECTIVES  Define the terms field, record, table, relational database, primary key, and foreign key  Create a blank database.
1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Access 2010 by Robert Grauer, Keith Mast, and Mary Anne.
Modify Tables and FieldsModify Tables and Fields Lesson 4 © 2014, John Wiley & Sons, Inc.Microsoft Official Academic Course, Microsoft Word Microsoft.
Build a database II: Create tables for a new Access database Create your tables In a relational database, tables store your data. Your data doesn’t “live”
Access Queries and Forms. Adding a New Field  To insert a field after you have saved your table, open Access, and open the table  It is easier to add.
COMPREHENSIVE Access Tutorial 1 Creating a Database.
1 11 Chapter 7 Action Queries Exploring Microsoft Office Access 2007.
Excel Tutorial 8 Developing an Excel Application
Homework 1 Hints.
Microsoft Office Access 2010 Lab 2
Building a User Interface with Forms
Exploring Microsoft Office Access
Access Creating a Database
Access Creating a Database
Access Maintaining and Querying a Database
HANDS-ON TUTORIAL 1 By ARLENE N. BARATANG.
Exploring Microsoft Office Access
Exploring Microsoft® Access® 2016 Series Editor Mary Anne Poatsy
Chapter 1 Databases and Database Objects: An Introduction
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Exploring Microsoft Access 2003
Guidelines for Microsoft® Office 2013
Presentation transcript:

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

TYPES OF VALIDATION RULE

FIELD VALIDATION RULE Use a field validation rule to check the value that you enter in a field when you leave the field. For example, suppose you have a Date field, and you enter >=#01/01/2007# in the Validation Rule property of that field. Your rule now requires users to enter dates on or after January 1, If you enter a date earlier than 2007 and then try to place the focus on another field, Access prevents you from leaving the current field until you fix the problem.

RECORD VALIDATION RULE Use a record validation rule to control when you can save a record (a row in a table). Unlike field validation rules, record validation rules refer to other fields in the same table. You create record validation rules when you need to check the values in one field against the values in another. For example, suppose your business requires you to ship products within 30 days and, if you don't ship within that time, you must refund part of the purchase price to your customer. You can define a record validation rule such as [RequiredDate]<=[OrderDate]+30 to ensure that someone doesn't enter a ship date (the value in the RequiredDate field) too far into the future.

WHERE YOU CAN USE VALIDATION RULES You can define validation rules for tables and for controls on forms. When you define rules for tables, those rules apply when you import data. To add validation rules to a table, you open the table in Design view and set various table properties. To add validation rules to a form, you open the form in Design view and add rules to the properties of individual controls.

WHAT YOU CAN PUT IN A VALIDATION RULE Your validation rules can contain expressions — functions that return a single value. You can use expressions to perform calculations, manipulate characters, or test data. When you create validation rules, you use expressions primarily to test data. For example, an expression can check for one of a series of values, such as "Tokyo" Or "Moscow" Or "Paris" Or "Helsinki". Expressions can also perform mathematical operations. For example, the expression <100 forces users to enter values less than 100. The expression ([OrderDate] - [ShipDate]) calculates the number of days that elapsed between the time an order was placed and the time it shipped.

CREATING A VALIDATION RULE

BEGIN Click MS Access 2013 On the MS Access Screen Pane, select Blank Database Create a name that will reserve as your file for the database

In the screen pane, click blank desktop database

In the screen box, click the browse button to save in any file that you want Write your name in the box that you want to save your database Click create if done

IN THE MS ACCESS ENVIRONMENT Right Click the “Table 1”.

Click Design View

Save first. Write your name inside the Table Name Box Click “OK” if done.

You are now in the Design View.

HOW TO ADD FIELDS IN THE DESIGN VIEW Write first your Field Name.

Second, select from the data type that you want.

Third, is to write a short description based on your field name.

If you're done. Click the General Properties (Field) to emphasize your field.

CREATING A VALIDATION RULE In the validation rule, follow the format that was given in Part 5.1

For example You can get input mask as much as possible if you want.

CREATING A VALIDATION RULE IN A DIFFERENT WAY Click the button with …

The button has been entered and you can write some functions. After you write expressions in the Expression Builder, click OK.

After your done, creating the validation rule. You need to write first your validation text before you save. Like this.

PUTTING IT IN THE DATABASE VIEW Right Click Table1. Click Datasheet View. Don’t forget to save your design view

YOU ARE NOW IN THE DATASHEET VIEW

You can get more records when you are in the datasheet view. A sample will be like this.

WHAT IF THE REQUIRED FIELD CAN’T BE

The message is So you need to be sensitive in writing your field. Check your Design View if it follows the format for the validation rule.

Then it backs

If you want to change your Validation Rule. As long as it follows the format in there.

VALIDATE DATA DURING ENTRY IN FORMS The easiest and fastest way to apply a validation rule to a form is to first add the rule to the underlying table field, and then use the automated form-creation tools that Access provides to create a form. For example, on the Create tab, in the Forms group, you can choose to have Access create a simple form, a split form, a multiple- item form, and more. When you use one of those tools, the controls on the form inherit the underlying table properties, including any validation rules and validation text. You can also apply a validation rule to a form control by opening the form in Design view and adding a rule to the Validation Rule property and message text to the Validation Text property of the control. You can add validation rules to some, but not all, form controls. The easiest way to determine if you can add a validation rule to a control is to open the form in Design view and follow the steps in this section.

Remember that a control can have a different validation rule than the table field to which the control is bound. When a conflict develops between validation rules, the rule defined for the table field takes precedence. Also, remember that rules in controls and table fields can cancel each other out and thus prevent you from entering any data at all. For example, suppose you apply the following rule to a date field in a table: <#01/01/2007# But you then apply this rule to the form control bound to the table field: >=#01/01/2007# The table field now requires values earlier than the year 2007, but the form control forces you to enter dates after that year, thus preventing you from entering any data at all. If you try to enter data under those conditions, Access tells you to enter dates before and after those specified by the conflicting validation rules, and you find yourself caught in an endless loop. The following steps explain how to add validation rules to controls, and how to lock controls and thus prevent users from altering data.