modify subforms

17
Activity Relevancy Resources 1. Distribute Guided Practice: Modify Forms to students. Using a digital projector, demonstrate the activity as students take notes, answer questions, and follow along at their computers. Allow ample time for discussion during the completion of this activity. Ask students why and how during each stage of the activity to evaluate and enable their understanding of the importance of formatting, the uses of forms and subforms, and the functions of the properties fields in database tables and forms. Understand forms and subforms through guided practice by completing the following tasks. o Edit fields. o Perfor m calculation s Guided Practice: Modify Forms activity and key (p 39-46) 5.02/ Dbase Activities/ B&B

Upload: wmassie

Post on 22-Nov-2014

1.823 views

Category:

Technology


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Modify Subforms

Activity Relevancy Resources

1. Distribute Guided Practice: Modify Forms to students.

Using a digital projector, demonstrate the activity as students take notes, answer questions, and follow along at their computers.

Allow ample time for discussion during the completion of this activity. Ask students why and how during each stage of the activity to evaluate and enable their understanding of the importance of formatting, the uses of forms and subforms, and the functions of the properties fields in database tables and forms.

Understand forms and subforms through guided practice by completing the following tasks.

o Edit fields.

o Perform calculations

Guided Practice: Modify Forms activity and key (p 39-46)

5.02/ Dbase Activities/ B&B

2. Distribute Independent Practice: Modify Forms to students and instruct them to complete the activity independently.

Monitor and provide assistance as necessary.

Display student work.

Discuss reasons for the formats and calculations performed in this activity.

Understand forms and subforms through independent practice by completing the following tasks.

o Edit fields.

o Perform calculations

Independent Practice: Modify Forms activity and key (p 47-48)

5.02/ Dbase Activities/Hair

Page 2: Modify Subforms

Guided Practice: Modify Forms Teacher Demonstration

Student Name Period Date

GUIDED PRACTICE: MODIFY FORMS

In this activity you will follow along with your teacher to add a query-based subform to a form and make modifications to the form and subform.

You will need the B&B database used earlier in this objective and well as two other tables that you will create according to the directions below. A query will be created to gather information for the subform from the Reservations and Prices tables and link it to the main form.

Part I: Add tables to the B&B database, retrieve data from another table, and set property values.

1. Open the B&B database and create a database table using the following information. Save the table as Prices.

Field Name Data Type Description

ID AutoNumber

Inn Lookup

Double CurrencyDouble Occupancy, Regular Room, 2 Queen Sized Beds

2. Set the ID field as the primary key

3. It is not necessary to enter the data for the Inn field again. Retrieve the data from the HistoricInns table:

Notes:

Page 3: Modify Subforms

Guided Practice: Modify Forms Teacher Demonstration

Student Name Period Date

4. Complete the Prices table by entering the pricing information from the table below.

5. Save the table.

6. Create another table and name it Reservations. Format the fields as follows:

a. ID............................AutoNumberb. Name......................Textc. Inn...........................Lookupd. Nights......................Lookupe. Adults......................Lookupf. # of Rooms.............Lookup

7. Use the Lookup property to create a drop down list for the Inn field.

Page 4: Modify Subforms

Guided Practice: Modify Forms Teacher Demonstration

Student Name Period Date

8. Format the Nights, Adults, and # of Rooms fields as lookup values. Set the values as follows:

1. Nights: 0, 1, 2, 3, 4, 5, 6, 7

2. Adults 1, 2

3. # Rooms 1, 2, 3, 4, 5

Notes:

9. Enter the records below into the Reservations table.

Part II: Create the query that will be used in the subform of the HistoricInns Form.

10. Create a query using the Reservations and Prices tables. Add the fields shown below.

a. Reservations table:1. Name2. Nights3. Adults4. ID

b. Prices table1. Double2. Inn

Page 5: Modify Subforms

Guided Practice: Modify Forms Teacher Demonstration

Student Name Period Date

11. Save the query as Cost.

Part III: Analyze your work and establish relationships.

12. Describe the results of the query.

13. Why do you think the ID and Inn fields included in the query?

14. Establish the relationships according to the graphic below and save.

15. Based on the graphic above, what purpose does the Cost Query serve?

Page 6: Modify Subforms

Guided Practice: Modify Forms Teacher Demonstration

Student Name Period Date

Part IV: Add the Cost Query as a subform to the HistoricInns Form and analyze your work.

16. Select the HistoricInns form and add a subform using the Cost Query and include all fields. The subform will be sorted by hotel according to the Inn field of the main form.

17. Set the default view property to continuous forms and adjust the width and height of the subform so that two records show per page and.

18. What is the purpose of adjusting the width and height of the form?

19. Why is the subform displayed in continuous form view instead of datasheet view?

Part V: Modify the subform.

20. View the HistoricInns form and subform. Which field in the main form is repeated in the subform?

21. Hide the repeated field in the subform by setting the Visible Property for the text and label boxes to No.

Notes:

22. Add a text box to the sub form and key Amount (not in bold) in the label box. Align the boxes to fit the existing information.

Page 7: Modify Subforms

Guided Practice: Modify Forms Teacher Demonstration

Student Name Period Date

Part VI: Calculate the cost of each reservation.

23. If you were writing a spreadsheet formula to calculate the total price of a reservation, what three fields would be multiplied?

24. Using the Data Control property of the new text box, enter a formula to calculate the price for each reservation and format the data as currency.

Notes:

25. Test the formula to see if it is correct.

26. What have you learned from this activity and how does it apply to the “real” world?

27. Save and submit according to teacher directions.

Page 8: Modify Subforms

Guided Practice: Modify Subforms Teacher Key

GUIDED PRACTICE: MODIFY SUBFORMS

Page 9: Modify Subforms

Guided Practice: Modify Subforms Teacher Key

Part III: Analyze your work and establish relationships.

12. Describe the results of the query.

a. The query lists the name of each person who has a reservation, the number of nights they are booked, the number of adults, and the price for a double room. The ID number is the reservation number.

13. Why do you think the ID and Inn fields included in the query?

a. The two fields are included in the query to link the Reservations and Prices tables together and to later connect them to the HistoricInns form and table.

15. The Cost Query serves the purpose of joining information from the Reservations and Prices tables.

18. The purpose of adjusting the width and height of the form is to create a professional and user-friendly appearance in which the data can be clearly viewed.

19. The subform is displayed in continous form view to make it consistent with the appearance of the main form and to make it more user-friendly.

20. The Inn field is repeated.

23. Adults x Nights x Double

26. Student answers will vary.

Page 10: Modify Subforms

Independent Practice: Modify Forms Student Activity

Student Name Period Date

INDEPENDENT PRACTICE: MODIFY FORMS

In this activity you will work independently to modify a form and perform a calculation using the Hair database created in an earlier activity.

1. Retrieve the Hair form.

2. Modify the field properties in the subform to hide the Customer label and name.

3. Set the property of the subform header to not visible.

4. Explain why the Customer label and name should be hidden from the subform.

5. Add a text box to the subform below the last entry. Key Total (not in bold) in the label box/field name and format the control property of the box to the right of the label to calculate the total price per order and display in currency format.

6. Write the formula used to calculate the Total:

7. If desired, add design enhancements to the form.

8. Save and submit your work according to teacher directions.

Page 11: Modify Subforms

Independent Practice: Modify Forms Teacher Key

INDEPENDENT PRACTICE: MODIFY FORMS

Page 12: Modify Subforms

Independent Practice: Modify Forms Teacher Key