|
Step y step exercise. Creating a Table. |
|
Objective. |
|
Practising the procedures to create and open a data table with Access2003.
|
|
1 If Access is not open, open it to be able to carry out the exercise. 2 Open the Classes.mdb database which is found in the My documents folder. We are going to create two tables in the database. One table will be for the students and the other for the courses.
3 Double click on Create table in design view in the database window with Tables object selected. Or, click on the New 4 In the first row write the name of the first field, Student Code. 5 Press the ENTER key to go to the second column of the field. 6 By default, once situated in the second column the Data Type is Text, click on the arrow on the right and select Autonumber. 7 Press the ENTER key to go to the third column, but we will not use it. For the moment we will not change the properties of this field. 8 Press the ENTER key to go to the next field. 9 Write Student name as the Field Name of the second field. Leave Text as Data Type and position yourself in the third column. 10 In the Description column in the grid write: Type the student name. Press ENTER to go to the next column. 11 Write Student surname. 12 Press ARROW BELOW on the keyboard to go to the next row. 13 Now create the following fields: Address, City which will all be of the Text type and Postcode as numeric. 14 Next create a Date of birth field with Date/Time data type.
15 Click on Student code. 16 Click on the Primary key To the left of the field name a key will appear, indicating that this field is the primary key of the table.
17 Drop down the File menu. 18 Select the Save option. 19 When asked for the name of the table, write Students. 20 Click on the OK button.
21 Drop down the File menu. 22 Select the Close option.
23 Click on the New 24 Select Design View. 25 Click on the OK button. 26 In the first row write the name of the first field, Course code. 27 Press the ENTER key to go to the second column of the field. 28 Choose as Number as Data Type. 29 Press the ENTER key to go to the third column of the field. 30 Press the ENTER key to go to the next field. 31 Type Course name as the name in the second field of the table. 32 As we do not wish to change any of the other characteristics of the field, press the ARROW BELOW to go to the next field. 33 Type Hours , and select data type Number. (you can drop down the list or type the first letter (N)) 34 Create the following fields: Start date and Finish date - data type: Date/Time.
35 Click on Course code. 36 Click on the Primary key On the left of the field name a key will appear, indicating that this field is the primary key of the table.
37 Click on the Save 38 Type Courses as the name of the table. 39 Click on the OK button. 40 Click on the Close 41 Click on the Close
|
| |
|
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.
|