28
Customizing Field Properties Ms. Lara Jo F. Boongaling

Day4customizing field properties part1

Embed Size (px)

Citation preview

Page 1: Day4customizing field properties part1

Customizing Field

Properties

Ms. Lara Jo F. Boongaling

Page 2: Day4customizing field properties part1

Field Properties

Are field characteristics set for each field name with its corresponding data type while in the Design View.

It determines how long the field can be, what it will look like, what default value will be, and what can be entered.

Page 3: Day4customizing field properties part1

The field properties window

Page 4: Day4customizing field properties part1
Page 5: Day4customizing field properties part1
Page 6: Day4customizing field properties part1

Create a new database file named Properties. Design a new structure having these field names and data types.

1. Company ID(text) 6. Birthday(date/time) 2. Company Name(text) 7. Gender(text) 3. Company Address(text) 8. Position(text) 4. Employee Name(text) 9. Department(text) 5. Age(number) 10. Salary(number)

save as empfile1.

Page 7: Day4customizing field properties part1

Field Size Property

Is used to specify the number of characters to be entered in a field.

It is also used to set the maximum size for data stored in a field set under the Text, Number or AutoNumber data type.

Page 8: Day4customizing field properties part1
Page 9: Day4customizing field properties part1

Copy the table empfile1 to empfile2.

In the design view , change the field size property to their new settings:

Company ID – 30 charactersEmployee Name – 30 charactersAge – ByteGender – 1 character

Page 10: Day4customizing field properties part1

Format Property

Is used to customize the way numbers, dates, times and text are displayed and printed.

Page 11: Day4customizing field properties part1

Date / Time Data Type Format

Page 12: Day4customizing field properties part1

Decimal Places Property

Specifies the number of digits to the right of the decimal point, which Access uses to display numbers.

Auto – default setting.0 to 15 – the digits appear at the right

of the separator is the specified number of decimal places set by the user.

Page 13: Day4customizing field properties part1

In empfile2, set the following to their new Format and Decimal Places property settings:

Age – General Number w/o decimalsBirthday – Medium DateSalary - Standard

Page 14: Day4customizing field properties part1

Input Mask Property

Is a field template or a pattern to validate how each character is entered into the field.

This makes data entry easier to handle by assigning a desired format to Text, Number, Currency and Date/Time data type entries in a datasheet.

Page 15: Day4customizing field properties part1
Page 16: Day4customizing field properties part1

In empfile2, set the input mask of the following fields:

Company ID - >AAA-000(to display 3 capital letters, dash and 3 – digit numbers)

Salary - P99,999.99(to display a 5-digit value of two decimal places with a P sign)

Age - 99(will accept and display a 2-digit value)

Gender - >L(will accept any letter to display in upper case)

Page 17: Day4customizing field properties part1

Caption Property

Is used to assign a different label to appear at the top of the column in the Datasheet View.

This is usually used in case you want to display a different name that will serve as the field name, aside from the previously one set in the Design View.

Page 18: Day4customizing field properties part1

Default Value Property

Is used to assign a value that is automatically displayed in a table when records are entered.

It takes effect only on new additional records.

Page 19: Day4customizing field properties part1

Set the caption property of Birthday field to Birthdate.

Set the Default Value Property of Gender field to “M”.

Page 20: Day4customizing field properties part1

Validation Rule Property

It allows you to verify data as you enter it into the table

It is an expression used to specify requirements for data entered or to limit the values that can be entered in a field.

The maximum length set is 2048 characters.

Page 21: Day4customizing field properties part1

Validation Text Property

Is used to specify the text to appear in the alert box that tells the user when a validation rule is broken.

The maximum length is 255 characters.

Page 22: Day4customizing field properties part1

In empfile2, assign the validation rule paired with the validation text message.

Set the Department field to:Field Size- 4 Input Mask - >AAAA

Field Name Validation Rule

Validation Text

Age >=18 and <=60

Enter ages 18 to 60 only

Gender M or F Enter M or F only

Department MNGT or ACCT or MKTG or PROD or MAIN

Department Choices:MNGT, ACCT, MKTG, PROD, MAIN

Page 23: Day4customizing field properties part1

Required Property

To specify whether a value is required in a field.

If it is set to YES then the field is required to enter data, if set to NO, then the field does not have any requirement set.

Page 24: Day4customizing field properties part1

Allow Zero Length Property

Is used to specify whether a zero-length string (“”) is a valid entry in a table field.

Yes – allow a zero length property as a valid entry.

No – if you do not allow a zero length property as a valid entry.

Page 25: Day4customizing field properties part1

In empfile2, assign these property settings to the following fields:

Company ID Yes (Required Property)

Employee Name Yes (Required Property)

Position Yes (Zero Length Property)

Department Yes (Required Property)

Salary Yes (Required Property)

Page 26: Day4customizing field properties part1

Between empfile1 and

empfile2, which do you think has the

better format?

Page 27: Day4customizing field properties part1

Activity:

Give the input mask of the ff:1. It will accept 3 small letters, a dash

and 3 digit numbers. (entry required)

2. It will accept 4 capital letters. (entry required)

3. It will accept 3 capital letters, dash and 3 digit numbers. (entry optional)

Page 28: Day4customizing field properties part1

Thank You!