Microsoft Office Tutorials and References
In Depth Information
Case Problems
c. Select Student as the table.
d. In the Import Text Wizard dialog boxes, choose the option to import delimited
data, to use a comma delimiter, and to import the data into the Student table. Do
not save the import steps.
15. Open the Student table in Datasheet view, resize columns in the datasheet to their
best fi t (as necessary), and then save and close the table.
16. Create a new table in Design view, using the table design shown in Figure 2-49.
Figure 2-49
Design for the Contract table
Field Name
Data Type
Description
Field Size
Other
ContractID
Text
Primary key
4
Caption = Contract ID
StudentID
Text
Foreign key
7
Caption = Student ID
TeacherID
Text
Foreign key
7
Caption = Teacher ID
LessonType
Text
25
Caption = Lesson Type
LessonLength
Number
30 or 60
Integer
Caption = Lesson Length
minutes
LessonCost
Currency
Format = Currency
Decimal Places = 0
Caption = Lesson Monthly Cost
RentalCost
Currency
Monthly rental
Format = Currency
charge for
Decimal Places = 0
instrument
Caption = Monthly Rental Cost
17. Specify ContractID as the primary key, and then save the table using the name
Contract .
18. Switch to Datasheet view, and then use the Start and End Dates Quick Start
selection in the Data Type gallery to add two Date/Time fi elds between the TeacherID and
LessonType fi elds. ( Hint: Be sure to make the LessonType fi eld the active fi eld before
adding the new fi elds.)
19. Switch to Design view, specify the Short Date format for the StartDate and EndDate
fi elds, change the fi eld captions to Contract Start Date and Contract End Date
(respectively), and then save and close the Contract table.
20. Use the Import Spreadsheet Wizard to add data to the Contract table. The data you
need to import is contained in the Lessons workbook, which is an Excel fi le located
in the Access1\Case1 folder provided with your Data Files.
a. Specify the Lessons workbook as the source of the data.
b. Select the option for appending the data to the table.
c. Select Contract as the table.
d. In the Import Spreadsheet Wizard dialog boxes, choose the Sheet1 worksheet,
make sure Access confi rms that the fi rst row contains column headings, and
import to the Contract table. Do not save the import steps.
21. Open the Contract table and add the records shown in Figure 2-50. ( Hint : Use the
New button in the Records group on the Home tab to add a new record.)
Figure 2-50
Records for the Contract table
Contract
Start Date
3/21/2013
6/1/2013
Contract
End Date
3/21/2014
6/1/2014
Lesson
Monthly Cost
$140
$200
Monthly
Rental Cost
$35
$0
Contract ID
3176
3179
Student ID
VAR7527
MCE7551
Teacher ID
91-0178
70-4490
Lesson Type
Violin
Guitar
Lesson Length
30
60
22. Resize columns in the datasheet to their best fi t (as necessary), and then save and
close the Contract table.
 
Search JabSto ::




Custom Search