Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Laboratory Activity No.

7
Creating a Data Table and Modifying Field Properties
1. Open MS Access. Create a database (2002-2003 format) with a filename Clinic in your folder
(Make sure that you save it in your created folder in Local Disc D).
2. Create a table named Patients. In the Design View, input the following fields: PatientCode
(Number); PatientFName (Text); PatientLName (Text); PatientAddress (Text); PatientCity (Text);
PatientZipCode (Text); PatientPhone (Text); PatientBirth (Date/Time); and PatientPhoto (OLE
Object). For the moment, we will not define a primary key. Save your table by right-clicking the
Patients Tab and clicking Save.
3. Create another table named Doctors with the following fields: DoctorCode (Text); DoctorFName
(Text); DoctorLName (Text); and DoctorSpecialty (Text). Again, we will not define a primary key.
Save your table.
4. Create another table named Entries with the following fields: EntryNumber (Autonumber);
EntryRoom (Number); EntryBed (Text); and EntryDate (Date/Time). Again, we will not define a
primary key.
5. Now, let us modify the field properties. Edit the Patients table by following these indications:
Field Name
PatientCode
PatientFName
PatientLName
PatientAddres
s
PatientCity
PatientZipCod
e
PatientPhone
PatientBirth

Properties (Data Type)


Integer
Size: 15
Size: 30
Size: 30
Size: 15; Data type: Look-up Wizard
Size: 5
Size: 15 with Telephone Input Mask
Format: Short date with Short Date Input
Mask

For the look-up wizard, follow these procedures:


a. Select the option I will type in the values that I want. Press Next.
b. Type the following:
cell 1 Tagaytay
cell 2 Dasmarinas
c. Click Next. Accept the default filename. Then click Finish.
6. Edit the Doctors table with the following field properties:
Field Name
DoctorCode
DoctorFName
DoctorLName
DoctorSpecial
ty

Properties (Data Type)


Size: 5; Format: accepts uppercase letters
only (>)
Size: 15
Size: 30
Size: 20

7. Edit the Entries table with the following field properties:


Field Name
EntryRoom
EntryBed
EntryDate
8. Save your database again.

Properties (Data Type)


Integer
Size: 1 ; Format: accepts uppercase letters
only (>)
Format: Short Date with Short Date Input
Mask

9. Now, try to see the format with the values by switching to Datasheet View. To do this, follow one
of the following:
a. Right-click the tabs with table names and select Datasheet View.
b. At the Navigation Pane at the left side of your screen, right-click the table and click Open.
10. Try to input records for each column at every table.
11. Your instructor will check your work before you close your window.

You might also like