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

7-2
.
Figure 7-1. The Form Layout for the ORDER Form
CHANGE FORMS FILE
In the ORDFORM1 forms file, the ORDER form, as shown in Figure 7-1,
contains customer information plus one line on which an order can be
entered. This restricts each order to one part number--a more practical
design is to have
multiple
order lines as well as the customer
information. In this exercise you separate the ORDER form into two
forms, one called ORDER_HEAD, that contains all the customer information
from the ORDER form, and another form called ORDER_LINE, that contains
only the line with order information. You define the ORDER_HEAD form as
frozen and the ORDER_LINE form as a repeating form appended to itself.
The result, when you run ENTRY, is that the customer information is
frozen on the screen with order lines appended to it each time the user
adds an order.
Since the ORDER_LINE form is repeated, new data can be entered until
there are no more parts to order. At that point, the user terminates the
repeat by pressing NEXT FORM in ENTRY. Although the next form is
identical to the existing TOTALS form, in this exercise let's give it a
new name (ORDER_TOTALS) to be consistent with the form names for the two
versions of the ORDER form. The result of redefining the forms is a file
with three forms:
ORDER_HEAD Contains the order number, date, customer name, and
address, and headings for the order line (same as the
ORDER form except the order line is omitted).