Activity 3 Creating a table in Design View

Activity 3 Creating a table in Design View We are going to create a table in Design View. After that, enter the data below into the new table. Field name Data type Other field properties Student_Name Text Field Size: 20 HKID Text Field Size: 11 Date_Birth Date / Time Format: Short Date Height Number Field Size: Long Integer Weight Number Field Size: Integer Prefect Yes / No Format: Yes / No

Activity 3 Creating a table in Design View Student_ Name HKID Date_Birth Height Weight Prefect Tony Leung A 234239(0) 4/5/1993 170 70 Yes Kimmy Wai A 369369(3) 10/10/1993 150 49 No May Cheung A 456453(6) 4/6/1993 166 58 No David Wong A 567567(6) 7/7/1993 171 60 No Eric Chan A 621621(7) 18/9/1993 170 45 Yes Agnes Li A 783783(5) 1/10/1993 158 56 Yes

Activity 3 Creating a table in Design View 1. Start Microsoft Access and open the database db 1. mdb which is created in Activity 2. 2. In the database window, click ‘Tables’ from the ‘Objects’ panel and then click New. Alternatively, you can double-click ‘Create table in Design view’ to go to Step 4.

Activity 3 Creating a table in Design View 3. Select ‘Design View’ in the ‘New Table’ dialogue box and click OK. 4. Click the first cell under the ‘Field Name’ and enter ‘Student_Name’.

Activity 3 Creating a table in Design View 5. Select the data type ‘Text’ from the pull down menu. 6. Change the value of the ‘Field Size’ to ‘ 20’.

Activity 3 Creating a table in Design View 7. Enter the properties for the rest of the fields by repeating steps 4 to 6. 8. Click the field ‘HKID’. Select ‘Edit’ ‘Primary Key’ to set ‘HKID’ as the primary key of the table. Alternatively, click the ‘Primary Key’ button on the menu bar to set the primary key. After a primary key is set, the icon is displayed next to the field.

Activity 3 Creating a table in Design View

Activity 3 Creating a table in Design View 9. Select ‘File’ ‘Save’ to save the table. 10. Enter “Student’s Profile” in the ‘Save As’ dialogue box and click OK.

Activity 3 Creating a table in Design View 11. Select ‘View’ ‘Datasheet View’ or click ‘Datasheet View’ button on the menu bar to switch to Datasheet View. Then enter data into the table. 12. Select ‘File’ ‘Close’ to close the table. 13. Select ‘File’ ‘Exit’ to exit Microsoft Access.

Activity 3 Creating a table in Design View 11. Select ‘View’ ‘Datasheet View’ or click ‘Datasheet View’ button on the menu bar to switch to Datasheet View. Then enter data into the table. 12. Select ‘File’ ‘Close’ to close the table. 13. Select ‘File’ ‘Exit’ to exit Microsoft Access.
- Slides: 10