Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1. Open the StockTracking.accdb database file from your student data files and save it as [your
initials] Access Project 2.
2. Review the existing table.
a. Open the Stocks table in Datasheet view. Verify that the table contains 25 records.
b. Switch to Design view.
c. Review the properties of the StockSymbol field since it is designated as the primary key. The
Data Type property contains Short Text and the Field Size property contains 7.
d. Close the table.
3. Create a new table using Table Design.
Page 1 of 7
a. Add the following fields into the table and set field properties.
Field Name
Data Type
Description
FKStockSymbol
Short Text
QuoteDate
Date/Time
Open
Currency
High
Currency
Low
Currency
Close
Currency
Volume
Number
AdjClose
Currency
PriceChg
Currency
PercentChg
Number
b. Create a concatenated primary key by selecting both the FKStockSymbol and the QuoteDate
fields together, and then clicking the Primary Key button.
c. Save the table as HistoricalPrices.
d. Change the Field Size of the FKStockSymbol field to 7.
e. Select a Short Date Format for the QuoteDate field.
f. Select a Standard Format and enter 0 for the Decimal Places for the Volume field.
g. For the PercentChg field, change the Field Size to Double, select a Percent Format, and select 2
for Decimal Places.
h. Make all fields Required, except for the PriceChg and PercentChg fields. On the first day of
trading, stocks will not have a value for those fields.
i. Save the table.
4. Create a one-to-many relationship between the Stocks table and the HistoricalPrices table.
a. Open the Relationships window and add the two tables. If the Show Table dialog box did not
automatically open, click the Show Table button to allow you to add the tables.
b. Drag the StockSymbol field from the Stocks table on top of the FKStockSymbol field in the
HistoricalPrices table. Release the pointer.
c. In the Edit Relationships dialog box, make the correct choices to Enforce Referential Integrity,
Cascade Update Related Fields and Cascade Delete Related Records.
Page 2 of 7
5.
6.
7.
8.
9.
10.
Page 3 of 7
e. Group By the StockSymbol and StockName fields, use the Max aggregate function on the Close,
High, and Volume fields, and the Min aggregate function on the Open field.
f. Sort the query by the Close field in descending order.
g. Save the query as MultipleStatisticsByStock.
h. Run the query. 25 records should display and match the results shown in Figure 1.
i. Close the query.
Page 4 of 7
12. Edit the report in Layout view so that it looks similar to Figure 3.
a. Switch to Layout view. If the Field List or Property Sheet open, close them.
b. Edit the Min label to read Minimum Value.
c. Edit the Max label to read Maximum Value.
d. Move the Min and Max labels to the right so that they are closer to the text boxes that contain
the values.
e. Move the PercentChg label and the Min and Max text boxes to the right.
f. Edit the PercentChg label to read % Chg of Daily Price.
g. Edit the label content, width, and location of the StockPriceSummary label in the header section
to match Figure 3.
h. Save the report.
13. Add conditional formatting to the report.
a. Add a rule so that any Max of PercentChg values that are greater than or equal to 20% display
in a bold, green font.
b. Add another rule so that any Min of PercentChg values that are less than or equal to -20%
display in a bold, red font.
c. Scroll through the records in the report to verify that you created and applied the rule correctly.
The first record that will show conditional formatting is Ford Motor Co.
d. Save the changes made to the report.
14. Edit the grouping and sorting in the report.
a. Change the group option to keep whole group together on one page.
b. Save the changes.
15. View the report in Print Preview.
a. Adjust the zoom to One Page. The report should be similar to that shown in Figure 3.
Page 5 of 7
Page 6 of 7
Page 7 of 7