Using VPLUS: An Introduction to Forms Design (32209-90004)
5-12
Action
Refer to the form layout for TOTALS, which was shown earlier in Figure
5-5.
Since the TOTALS form, as its name implies, contains the totals for the
order, the fields contain mainly dollar values and percentages. Thus,
all the fields are numeric, except the order number, the date, and the
customer name fields. Another feature of this form is that very few
items require user entry. Most fields that are not display-only can be
assigned initial values. For example, the discount percentage and the
tax rate, which change infrequently, will be assigned initial values.
The discount is calculated from the discount percentage, the tax from
the tax rate, and the total price is calculated from these and other
dollar values. In fact, the only values the user need enter are the
order number and the net price; shipping costs and customer name are
optional.
Action
Locate the Field Menu for ORDATE in the TOTALS Form. As was done for the
ORDATE field in the ORDER form, first change the field type to D for
display-only and the data type to MDY. Then press FIELD TOGGLE to go to
the Processing Specifications area of the menu. Now type in the
statement: SET ORDATE TO $TODAY, as shown in Figure 5-8. Press ENTER.
Do not supply a custom message since such messages are illegal with the
SET statement.
Figure 5-9. Field Menu for TOTNET in the TOTALS Form