|
Step by step exercise. Editing field properties. |
|
Objective. |
|
Practise the field properties with Access2003. |
|
1 If Access is not open, open it to be able to carry out the exercise. 2 Open the Classes.mdb database, found in My Documents in the hard drive.
3 Select the Student table by clicking on it so that it stands out. 4 Click on the Design 5 Click on the Student name field to edit its properties. 6 Click on the Field Size property that appears at the lower part of the window, by default the size will remain 50. 7 Type 15. 8 In order for the field to be obligatory we need to put in its Required property the value Yes, for this, position yourself over the Required property and select Yes from the drop down list. 9 As we do not want to modify any other properties in the Student name field, clic in the Student surname field in order to access the properties of this field. 10 TYpe 30 in Field Size. 11 Double click on the No value in the Required property, you will see how it has changed to a Yes. When a property has 2 possible values, by double clicking on the value it changes automatically. This way you have seen 2 different ways to change the Required property, now you choose which you prefer. 12 Click on the Address field and set Field Size to 30. As this field is optional we will leave the Required property as No. 13 Click on the City field and set Field Size to 15. In order for Los Angeles to appear as the default value we need to change its Default Value property 14 Click on the Default Value property. 15 Type Los Angeles. 16 Click on the Postcode field and delete Default Value 0. Now we will create an Input Mask. 17 Click on the Input mask property , type 00000 (the 0 represents an obligatory numeric digit so that letters cannot be introduced, and that if a value is introduced it will need to contain 5 digits. In order for the postal code always to be less than 83000 we need to change the Validation rule property. 18 Click on the Validation rule property and type < 83000. To improve this validation rule we will fill the Validation text property so that the user knows that the value introduced is incorrect. 19 Click on the Validation text property and type The postal code has to be less than 83000. This is the message that will appear if the user attempted to introduce a value equal to or more than 83000. 20 Click on the Date of birth field. 21 Click on the Format property. An arrow will appear to the right, indicating to us the existence of a drop down list. 22 Click on the arrow to the right side. 23 Select the Short date option. 24 Click on the Course field. 25 Click on the Field size property. An arrow will appear to the right, indicating to us the existence of a drop down list. 26 Click on the arrow to the right side. 27 Select the Byte option. 28 Click on the Default value property. 29 Delete 0 value. As we have finished with the table's design we will save it. 30 Click on the Save A message appear, answer Yes.
1 Click on the Datasheet
view 2 Erase all ceros in Course field. If you let one you will have problems creating relationship in Unit 6. 3 Close the Datasheet window.
1 Select the Courses table in such a way that it stands out. 2 Click on the Design 3 Click on the Course code so as to edit its properties. 4 Click on the Field Size property that appears at the lower part of the window. An arrow will appear to the right of the property indicating the existence of a drop down menu. 5 Click on Byte option. 6 Set Field Size to 15 in Course name field. 7 Set Hours Field Size to Integer. 8 Click on the Save 9 Click on the 10 Close the database by clicking on the Close button in the Database window.
|
| |
|
Legal warning: Authorised on-line use only. It is not allowed the use of these courses in companies or private teaching centres.
|
|
© aulaClic. All rights reserved. Reproduction in any form whatsoever is prohibited.
April-2006.
|