Microsoft Access 2010 tutorial: Table field format


Table field format

III. Set Format of a table field

When you start to create a table, you must know the important properties of table field. Those properties include field size, format, input mask, default value, validation text, validation rule, require, and indexed.


Microsoft access 2010 field properties

III.1. Field Size Property

The field size is used to set the size of a field. The field size property is applied to text and number data type fields. Text data type field is stored text value; the field size specifies the number of characters that can be entered in to the field. For a number data type field is stored numerical value; the value of the field size can be Byte, Integer, Long Integer, Single, Double, etc. For instance, set field size on employee name; this field can enter only 70 characters. To do so, you have to set number in front of field size as figure:

Microsoft Access 2010 field size property

III.2. Format Property

When you create a table, you can set format to customize the fields you like. Those fields maybe have data type as text, number, currency or date/time. For example, you want all names of employees are capital letters when it display. You have to set it as the figure:

Microsoft Access 2010 format property

Note: You can use greater than (>) or less than (<) operators without @ symbol to display Upper case or Lower case letters.

III.3. Input Mask Property

By using Input Mask property, you can select a pattern you think it is suitable for your data display. To use this property, your table field must be text or Date/Time data type. The example below shows the use of input mask, a password pattern; when you enter your password number in a field password, it will display asterisk sign instead of number.

Microsoft Access 2010 input mask property

III.4. Default Value Property

You can use this property to predefine a value of the field . By setting the default value, this value will display when you open a table. For example you want set the word “No Title” on the title field of TblBook in order to inform you when you didn’t enter data on the field. The figure below will show you how to do this work.
Microsoft Access 2010 default value propery

III.5. Validation Rule Property

Validation Rule Property allows you to limit or control what you want users to enter on a table field. In order to avoid errors, you should use this property. It can help you to save the time for problem solving. For instance, you want to set condition on income field, only positive number is possible. In case, you enter negative number the message will display to inform you to enter the correct value. To define validation rule follow the figure below:

Microsoft Access 2010 validation rule property

Through example above, you maybe wonder what data type can you use with validation rule? The answer is all data type of field. In addition, you can set other conditions besides example above such as “Male or Female”, “>100 and <1000”, “<=150” and so on.

III.6. Validation Text Property                                         

This property is used with validation rule property. The validation text display when the user enters data that violate the validation rule. The figures below show how to set validation text and the alerted message.

Microsoft Access 2010 validation text property

III.7. Required Property

This property requires data to enter in a field. It has two values for you to choose “Yes” and “No”.

       Yes: Need to input data

        No: Not require data entry

Microsoft Access 2010 Require property

III.8. Indexed Property

This property allows your data searching and shorting faster but it is slow for data updating. There are two values for you to select when you use Indexed property. First Yes (Duplicates Ok) and last one Yes (No Duplicates).

       Yes (Duplicates Ok): Redundancy data was not allowed

        Yes (No Duplicates): Redundancy data was allowed

Indexed property


Comments




This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.