Using VPLUS: An Introduction to Forms Design (32209-90004)

6-11
the phase header INIT before the statement SET TO $TODAY. Press ENTER to
record the change for each field.
Later in this section, you use the INIT phase once again to initialize
the total net price for the TOTNET field in TOTALS.
Note that the value of SORDNUM is tested and incremented in the
initialization phase, rather than in the final phase, to prevent its
being incremented when corrections are entered in Browse mode. It is
important to remember that the initialization phase is the only phase
not
executed in Browse mode.
Figure 6-8. Field Menu for NAME in the ORDER Form
TRANSFER VALUES BETWEEN FORMS
So far you transferred the same value from a save field to fields in two
different forms. Now, you use save fields to transfer values entered on
one form to another form. The two save fields, SNAME and STOTNET are
used for this purpose. The value of NAME in the ORDER form is
transferred to the SNAME save field. Then the value in SNAME is
transferred to the NAME field in TOTALS. Similarly, the value in TPRICE
of the ORDER form is transferred to the STOTNET save field, and the value
in STOTNET is subsequently moved to the TOTNET field of TOTALS. To
perform these transfers, SET statements must be added to the name and net
total fields of both the ORDER form and the TOTALS form. Start with the
NAME field in the ORDER form.