3.7 ADD

To add a new record to a file, press the ADD key <F6>. Form displays ADD in the upper status line indicating that form is in ADD mode. The other functions that you may perform are displayed on the next line. Form moves the cursor to the first position of the first entry field on the form. At this point, you may enter data where appropriate. The Tab, RETURN, Line Feed, and Arrow keys move the cursor on the screen and position the cursor in the desired field.

To store the data you have entered, press the STORE key <F5>. Some fields on the form may have a requirement that they contain data before the record is allowed to be stored. If any of these fields are blank when you press the STORE key <F5>, form positions the cursor to the beginning of the first such field and displays Input required in the upper status line. In addition, some data entry forms may require that each record you enter must have a unique key value. (Note: The subject of key values is covered in depth in Chapter 4, Creating RMSfiles.) If a record has already been stored in the data file with that particular key field value, the error message Record already exist is displayed and the record will not be stored.

If form detects any input errors, you must correct them and press the STORE key <F5> again.

When the record has been successfully stored, form clears the non-initialized entry fields on the form and repositions the cursor to the beginning of the first entry field so that another record may be added. This process is repeated for each record to be entered.

As each record is stored, a copy of the contents of each field is saved. To duplicate the contents of a field, just press the Line Feed key or Ctrl + J while the cursor is positioned in the corresponding field. This can be quite a time-saver when the same data must be entered into the same field for each record.

To exit from a form that is in ADD mode, all the non-initialized entry fields on the form must be blank. If they are not, the error message Must STORE record first is displayed.

If an ADD function is initiated and it is then decided not to add the record, you may cancel the ADD function by selecting the CANCEL function (press the GOLD key <F1> followed by the X key). (Note: The CANCEL function is one of the previously mentioned GOLD functions that is covered in a subsequent section of this chapter.)