day 20: access chapter 5 tazin afrin [email protected] [email protected] october 29,...

13
DAY 20: ACCESS CHAPTER 5 Tazin Afrin [email protected] October 29, 2013 1

Upload: sandra-ellis

Post on 12-Jan-2016

218 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: DAY 20: ACCESS CHAPTER 5 Tazin Afrin Tazin.Afrin@mail.wvu.edu Tazin.Afrin@mail.wvu.edu October 29, 2013 1

DAY 20:ACCESS CHAPTER 5

Tazin [email protected]

October 29, 2013

1

Page 2: DAY 20: ACCESS CHAPTER 5 Tazin Afrin Tazin.Afrin@mail.wvu.edu Tazin.Afrin@mail.wvu.edu October 29, 2013 1

2

OBJECTIVES

• Establish data validation• Create input mask• Create and modify lookup table

Page 3: DAY 20: ACCESS CHAPTER 5 Tazin Afrin Tazin.Afrin@mail.wvu.edu Tazin.Afrin@mail.wvu.edu October 29, 2013 1

3

DATA VALIDATION

• Data validation is a set of constraints or rules that help control how data is entered into a field.

• Access provides some data validation automatically

Page 4: DAY 20: ACCESS CHAPTER 5 Tazin Afrin Tazin.Afrin@mail.wvu.edu Tazin.Afrin@mail.wvu.edu October 29, 2013 1

4

DATA VALIDATION METHODS

• Required– Sets the Required property of a field to force data entry,

such as a last name.

• Default value– Specifies a value that is automatically entered into a field.

• Validation rule– Limits the type of data a user can enter into a field.

• Validation text– Provides the error message telling users what they did

wrong and gives them instructions on what they need to do to fix it.

Page 5: DAY 20: ACCESS CHAPTER 5 Tazin Afrin Tazin.Afrin@mail.wvu.edu Tazin.Afrin@mail.wvu.edu October 29, 2013 1

5

DATA VALIDATION METHODS

• Input mask– Forces to conform to a specific data entry format.

• Lookup lists– Field values are limited to a predefined list of

values.

• Multiple value field– Accepts multiple values in a single field. – For example, an employee might have a status of

both full time and temporary.

Page 6: DAY 20: ACCESS CHAPTER 5 Tazin Afrin Tazin.Afrin@mail.wvu.edu Tazin.Afrin@mail.wvu.edu October 29, 2013 1

6

REQUIRED

• Cannot be left blank when you create a new record.

• Primary keys are required fields by definition.

• Default Required setting is No for all the remaining fields.– Set the Required property to Yes for critical

fields.– Set in design view of table.

Page 7: DAY 20: ACCESS CHAPTER 5 Tazin Afrin Tazin.Afrin@mail.wvu.edu Tazin.Afrin@mail.wvu.edu October 29, 2013 1

7

DEFAULT VALUE

• When a majority of new records contain a common value, you can set a default value for that field to reduce data entry time.

• Establish a field’s default property by selecting the field in the table design view.

• You can type Date() in the Default Value property to insert the current date when a new record is added. – This type of default value is useful for fields like

Date of Entry, Date Record Added, and Order Date.

Page 8: DAY 20: ACCESS CHAPTER 5 Tazin Afrin Tazin.Afrin@mail.wvu.edu Tazin.Afrin@mail.wvu.edu October 29, 2013 1

8

VALIDATION RULE

• A validation rule is designed to restrict the data values that can be entered into a field.

• Data values that do not conform are rejected. • Examples:

– If all of your school’s course numbers are larger than 100, then you could establish a validation rule to prohibit values less than or equal to 100 on a registration form.

• Validation rules do not make the field required

Page 9: DAY 20: ACCESS CHAPTER 5 Tazin Afrin Tazin.Afrin@mail.wvu.edu Tazin.Afrin@mail.wvu.edu October 29, 2013 1

9

VALIDATION TEXT

• Validation text informs users that the validation rule has been broken, and how to correct it.

• If you violate a validation rule, Access will not let you continue until the data value conforms to the rule.• For example, the validation text for the rule violation

above might be, “You have entered an invalid course number. Please recheck the number and enter a value greater than 100.”

Page 10: DAY 20: ACCESS CHAPTER 5 Tazin Afrin Tazin.Afrin@mail.wvu.edu Tazin.Afrin@mail.wvu.edu October 29, 2013 1

10

INPUT MASK

• An input mask restricts the data being input into a field by specifying the exact format of the data entry.

• Examples:– Phone numbers– Social Security numbers– Zip codes– Dates

• Use input mask wizard.

Page 11: DAY 20: ACCESS CHAPTER 5 Tazin Afrin Tazin.Afrin@mail.wvu.edu Tazin.Afrin@mail.wvu.edu October 29, 2013 1

11

LOOKUP FIELD

• A lookup field provides the user with a finite list of values to choose from.

• For example, class status in a university’s student table would be Freshman, Sophomore, Junior, Senior, Graduate, or Other.

• Use lookup wizard in design view.

Page 12: DAY 20: ACCESS CHAPTER 5 Tazin Afrin Tazin.Afrin@mail.wvu.edu Tazin.Afrin@mail.wvu.edu October 29, 2013 1

12

UPCOMING DEADLINES

• 1st November– Homework 4 due

• 4th November– MyITLab Lesson D due

• 8th November– Homework 5 due

• 12th November– Exam 2 on MS Access

Page 13: DAY 20: ACCESS CHAPTER 5 Tazin Afrin Tazin.Afrin@mail.wvu.edu Tazin.Afrin@mail.wvu.edu October 29, 2013 1

THANK YOU LOG OFF