Using VPLUS: An Introduction to Forms Design (32209-90004)
7-18
.
Figure 7-15. The Field Menu for ORDNUM
One more change is required to the ORDER_TOTALS form to insure correct
data in this situation. When NEXT FORM is pressed to stop the repeat of
ORDER_LINE, the next form, ORDER_TOTALS, is displayed. Whenever this
form is displayed in Collect mode, all the initialization procedures are
performed. One of these procedures sets the order number from the
SORDNUM save field and then increments the value of SORDNUM by 1. After
the user goes to Browse mode to correct an order line and then returns to
Collect mode, the ORDER_TOTALS form is displayed again. The
initialization procedures are performed again, which means that the save
field SORDNUM is incremented again. This causes the order number on the
ORDER_TOTALS form to be greater than the order number for the same order
on ORDER_HEAD.
Action
Because of this, you change the field type from D for Display-Only to R
for required on the Field Menu for ORDNUM as shown in Figure 7-15. Press
ENTER.
Changing the field type to required allows the user to change the order
number if it is greater than the correct number for the current order.
Changes cannot be made after an order is completed because the user
cannot change the corresponding value of TOTNET in ORDER_TOTALS, which
is a display-only field protected from user entry. This field would also
need to be changed to a required field to allow the user to correct the
total if necessary, but for simplicity in this exercise, leave TOTNET as