Using VPLUS: An Introduction to Forms Design (32209-90004)
5-10
to assign a date to a field, the data type (DType) must be MDY, DMY, or
YMD.) The Field Menu for ORDATE in the ORDER form now appears as shown in
Figure 5-6.
Figure 5-7. Field Menu for TPRICE in the ORDER Form
CALCULATED VALUES
In addition to assigning specified values to display-only fields, the
SET TO statement is also used to assign
calculated
values to display-
only fields. In this case, the data type of all the fields involved in
the calculations must be numeric. That is, their data type must be DIG,
NUM[n], or IMPn. To illustrate, let's calculate the total cost of the
part ordered through the ORDER form.
Action
First, locate the Field Menu for TPRICE in the ORDER form.
Since the TPRICE field is the last of 13 fields in the ORDER form, the
simplest method is to press NEXT FORM to go to the Form Menu for TOTALS,
and then press PREV to go back to the last Field Menu of the previous
form, ORDER. Or, you can go to the Main Menu, select G, the form name
(TOTALS) and the field name (TPRICE) to go to the particular field.
Action
When the Field Menu for TPRICE is displayed, change the field type to D.