Assignment 5
Home Up

ASCII table

Exercise 1

  1. Using the database Properties in the Unit 2 folder, you created in Lesson 1 in the DPS folder. Create a new form, do not attach a database to it.
  2. Change the Caption of the form to display, Lesson 5 - Review
  3. Turn Record Selectors, Navigation Buttons and Dividing Lines to No
  4. Turn Auto Centre to Yes.
  5. Change the Width to 2 inches.
  6. Change Scroll Bars to none
  7. Save the form with the Name of Lesson5Exercise1.
  8. Create the following form. Make the Caption of the form read Fahrenheit.
  9. Name the textbox txtTemp, change it's label to read Temperature
  10. Name the label under the textbox, lblTemperature. Change its caption to read Converted Temperature is:
  11. There are actually two command buttons. One named cmdCelsius, which has a caption of Convert to Celsius. You can see this button in the picture below.
  12. The second button is in the exact same location and size of cmdCelsius. This second button has the name, cmdFahr, it has a caption of Convert to Fahrenheit. The reason you can not see it, is that its' Visible property has been set to No.

wpe2.jpg (6525 bytes)

  1. The user will then type a value for Fahrenheit degrees into the text box. When the user clicks the button, the correct number of degrees Celsius is shown in the lblTemperature label as shown below:

wpe3.jpg (7239 bytes)

  1. Also notice that the caption for the form changed to Celsius and the cmdFahr button is visible and the cmdCelsius button is not visible.
  2. When the cmdFahr button is clicked it will do the conversion from Celsius degrees into Fahrenheit.
  3. The conversion formulas are:

Celsius = (5/9) * (Fahrenheit - 32)
Fahrenheit = (9/5) * (Celsius + 32)

  1. Now when the result is shown in the label, the form caption changes back to Fahrenheit and the cmdCelsius button becomes visible and the cmdFahr button is not visible. This continues until the user closes the form.