3.11 Using Multiple Forms

It is possible to have multiple data entry forms for entering data. One example could be a series of forms used for entering customer orders. The first form displayed would be the customer record. This would be used for entering the billing information for the order. After this record is stored, a second form for entering shipping information would be displayed. The shipping address and instructions would be entered on this form. After this record is stored, a third form would be displayed. This would be used for entering the order itself. The three forms would repeat in this manner. All three would be used for entering one order.

To illustrate the use of a multiple form, we will expand on our earlier example. Each subscriber would be entered as before, but after entering the subscriber, each of the magazines that is subscribed to will be entered as well. A form that will do this is shown in the screen below:

gifs/00000001.gif

This form is similar to screen in Section 3.2, except that some headings (whose use will become obvious as you proceed with the example) have been added at the bottom of the form. The subscriber information is entered just as before, i.e., you must first press the ADD key <F6> and enter the data. After the data has been entered, the STORE key <F5> must be pressed so that the subscriber record will be stored in the data file.

In this example, once the subscriber information is stored, the fields are not cleared. Instead, another form appears on the screen. This form will be appended to the first form and as such will appear immediately beneath it on the screen. The screen below shows the screen as it appears with the second form appended:

gifs/00000001.gif

After this appended form has been displayed, a magazine subscription may be entered and stored. The cursor will only move within fields in the appended form. It is not possible while in the appended form to move the cursor back up to any of the fields on the first form.

There is also a different type of data field used in this form. Each time a valid magazine code is entered into the field labeled Magazine, that magazine's title is automatically displayed in the next field, labeled Title. This type of field is underlined on the screen. Underlining shows that the field cannot be changed. Only fields that are displayed in reverse video on the screen may have their contents entered or changed by the user. The field labeled Title is called a lookup field because the magazine's title is 'looked up' and displayed in the field each time a valid magazine code is entered.

In our example, the subscription form is now in ADD mode with the cursor positioned in the field labeled magazine. For a moment, let's suppose that a subscription for Co-Evolution Quarterly is to be entered but that the code for that magazine is not known. Since this form was created with a validation form linked to the field labeled Magazine, you may simply press the GOLD key <F1> followed by the V key to display the validation form, as shown in the screen below:

gifs/00000001.gif

At this point you could press the QUERY FIRST <F2> key and then continue to press the FIND NEXT <F3> key until the screen displays the information for the Co-Evolution Quarterly magazine, as shown in the screen below:

gifs/00000001.gif

Once this information has been 'found', you could then press the GOLD key <F1> followed by the E key. The subscription form is once again displayed with the fields labeled Magazine and Title filled in, and the cursor positioned in the next entry field, as shown in the screen below:

gifs/00000001.gif

At this point you would continue to fill in the remaining fields of the form and, once this information has been entered, the STORE key <F5> is pressed to store the subscription record. When this is done, another subscription form is displayed directly beneath the previous subscription form, as shown in the screen below:

gifs/00000001.gif

Now another subscription for the same subscriber may be entered. This entry process would then be repeated for each subscription.

Once the last subscription record has been stored, a new subscriber form may be displayed by pressing the NEXTFORM key <F7>. Whenever a form repeats, as in our example, pressing the NEXTFORM key <F7> will cause that form to stop repeating and the next form to be displayed. You may have several data entry forms appended to produce a complete series of forms. In our example, however, there is no form following the subscription form, so a new subscriber form would be displayed.