Customizing FieldProperties Ms. Lara Jo F. Boongaling
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.
Create a new database file namedProperties. Design a new structurehaving these field names and datatypes.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.
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.
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
Format Property Is used to customize the way numbers, dates, times and text are displayed and printed.
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.
In empfile2, set the following to their new Format and Decimal Places property settings:Age – General Number w/o decimalsBirthday – Medium DateSalary - Standard
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.
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)
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.
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.
Set the caption property of Birthday field to Birthdate.Set the Default Value Property of Gender field to “M”.
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.
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.
In empfile2, assign the validation rule paired with the validation text message. 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 Department MKTG or PROD or Choices: MAIN MNGT, ACCT, MKTG, PROD, MAINSet the Department field to:Field Size- 4 Input Mask - >AAAA
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.
Allow Zero LengthProperty 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.
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)
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)