1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

36
1 1 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection

Transcript of 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

Page 1: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

111

Exploring Microsoft Office Access 2007

Chapter 6

Data Protection

Page 2: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

2

Objectives

Establish Data Validity Create a Lookup Modify a Lookup by Adding and Deleting

Values Create and Modify a Multivalue Lookup

Field Work with Input Masks Add and remove pivot fields

Page 3: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

3

Objectives

Create Forms Using the Forms Tools Create Custom Forms Using Design

View Add Action Buttons and Combo Box

Controls Create Subforms Fashion Functional Formats

Page 4: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

4

Data Validity

It is important data be accurate and valid It is the only way to ensure accuracy

Remember:Reports, forms, queries all based on table dataGarbage In = Garbage out

Page 5: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

5

Data Validation in Access

Tools that help control the type and accuracy of data entered

Some validation provided in Access by defaultOnce data type declared, data entered must

matchPrimary key fields must be populatedData in primary key fields cannot be

duplicated

Page 6: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

6

Types of Validation

Required – data must be entered in field Default Values – supplies a given value in each field

automatically

Required property

Default Value property

Page 7: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

777

Types of Validation

Input Mask – forces data conformity Lookup Lists – values that can be chosen for a field

Input Mask propertyLookup field properties tab

Page 8: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

8

Setting Required Field Properties

In Design viewSelect the fieldIn Field Properties pane, select Required

Ensures field must be populated in all records

Required property

YES value in Required property

Page 9: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

9

Setting Default Value Field Properties

In Design view Select the field Select Default Value field Enter the value desired

Ensures that field must be populated in all records

Used primarily when the majority of records will share the same field value

Value entered in Default property

Default Value property

Page 10: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

Validation Rule

Allows the construction of a logical rule that data must comply with

Mathematical rules may be built with the Expression Builder

Validation Rule

Page 11: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

11

Validation Text

Serves as an informative message or prompt Informs the user that data entered is

invalid Provides a general explanation of why

validation was not met

Validation Text

Page 12: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

12

Validation Message

Validation text A user friendly message Appears when data entry is violated

No validation text Results in a difficult to understand message

With validation text

Without validation text

Page 13: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

13

Creating Lookup Fields

Lookup fieldsSpeeds data entryEnsure data accuracy

Create a lookup field in the easiest mannerSelect Lookup Wizard

in the drop-down data type field box

The Lookup Wizard will begin

Select Lookup Wizard

Page 14: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

14

Using the Lookup Wizard – Screen 1

Type your own valuesOR

Use existing values

Choose this options to type in values

Choose this option to use existing values

Field list

Page 15: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

15

Using the Lookup Wizard – Screen 2

Type field values you desire

OR Choose the table/query and the fields needed

Choose the field you wish to pull values from

Choose the tables and/or queries needed

Type the values you wish to use

OR

Page 16: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

16

Using the Lookup Wizard – Screen 3

When supplying your own values You will be prompted to label (name) the column Click Finish to end the Wizard

Click Enter a label for the column

Page 17: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

17

Using the Lookup Wizard – Screen 3

When using fields from a table/query You will be prompted to choose the sort order

for your field

Click Enter a label for the column

Page 18: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

18

Using the Lookup Wizard – Screen 4

When using fields from an existing table or queryYou will be prompted to adjust the width of your column

Drag column edge to adjust width

Page 19: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

19

Using the Lookup Wizard – Screen 5

When using existing fields You will be prompted to label (name) the column Click Finish to end the Wizard

Click Enter a label for the column

Page 20: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

20

Modifying a Lookup Field

Identify the record source of the data Change the data in the source object (add or

delete values) Data immediately added or deleted to the

field This step does not reclassify existing data

Existing data must be updated manually or with a query

Page 21: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

21

Trouble Identifying Record Source?

Click the Lookup tab in the Field Properties section Locate the Row Source property Object name after the word FROM identifies source

Row Source value

Page 22: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

22

Create a Multivalue LookupField

To allow for more than one value Select the Allow Multiple value check box

Click Enter a label for the column

Page 23: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

23

Input Masks

Specifies exact formatting of input data Uses special characters for format

specification Only used with text and date fields Common mask characters

0 Digit (0 to 9, entry required)9 Digit or space (with ‘+’ and ‘-’ not allowed )# Digit or space (with ‘+’ and ‘-’ allowed )

Page 24: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

24

Create an Input Mask

May be entered directly

Or May use the Input Mask Wizard

Use the Input Mask Wizard

Enter mask characters directly into Field Properties

Page 25: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

25

Forms

Provide an attractive user interface Aids in data entry

Page 26: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

26

Methods of Form Creation

You can create a form using:Form, Split and Multiple Form ToolsDatasheet ToolForm WizardBlank Form ToolPivot Chart and Table ToolsForm Design View

Page 27: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

27

The Form Tool

One click method Creates a very simple and basic form Can be altered and enhanced in Design view

Drop data field

Form created with Form tool

Page 28: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

28

The Split Form Tool

Creates a two part form including all fieldsOne section is in Form viewOne section is in Datasheet view

Edits are synchronized

Form View

Datasheet view

Split Form Tool

Page 29: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

29

Multiple Items Tool

Resembles a datasheet Faster navigation/data entry than normal

forms

Multiple Items Tool

Page 30: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

30

Datasheet Forms

Identical copy of a form in terms of looks

Has different protection features applied than the original form

To createChoose More Forms

from the Forms groupSelect Datasheet from

the drop down list

More Form command

Page 31: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

31

PivotTable and PivotChart Forms

Work the same as in query/table view

Create from PivotChart button on the Forms group

OR Click More Forms Tool in the

Forms group Choose PivotTable from the

drop down list

More Form Tool

Page 32: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

32

Using Design View to Create a Form

Allows for customization and personalization of forms Click the Blank Form tool in the Forms group Drag Fields onto the Design grid

Field List

Design Grid

Page 33: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

33

Action Buttons

Allows you to add navigational/other types of buttons

Wizard guides you through the creation

Button toolNavigational Button

Page 34: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

34

Subforms

Form that exists within another form Updated/viewed separately or with its parent form Normally, a one-to-many relationship exists between the

two forms

Subform (child)

Primary form (parent)

Page 35: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

35

Form Customization

To customize a formFirst remove the default

layout• Accomplished with the

Remove Layout tool• Reposition controls as

desired• Reposition several

controls at once by selecting multiple (shift-click) controls

Page 36: 1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.

36

Form Customization

Also customize by:Adding a theme

• Click Autoformat on the Format Tab

Add additional unbound controls where useful

Use groupings, labels and pictures for visual effect