2.4 Adding an Entry Field

Next, add an entry field. The entry field will contain the customer number.

Follow these steps:

  1. Choose the Entry field icon from the Parts Palette window.
  2. Click on this icon and move the pointer to the right of the Static text part. Click on the left mouse button.
  3. Double-click on this part with the left mouse button. The Properties notebook appears.
  4. Change the Part name setting on the General tab to CUSTNO. This name is the variable name for the customer number that is referenced at a later time within the VisualAge RPG code.
  5. Make sure that there is no text in the Text field for this part.
  6. Click on the Data tab. Change the length to 7.
  7. Click on the Validation tab. Select the Range setting radio button. Enter 0000000 as the current minimum value and 9999999 as the current maximum value.
  8. Make sure you enter exactly seven numbers in each field since the field length has been set to seven. Ignore the Database value fields for both the maximum and the minimum.

  9. Click OK to save and close the notebook.
  10. The Customer Inquiry window should now look like the following:

You can access help from the design window.

Follow these steps:

  1. Right click on the Entry Field part in your Customer Inquiry window.
  2. Select Events from the pop-up menu.
  3. Highlight the LOSTFOCUS event and press F1. The help window appears.
  4. Click on the system window icon to close the window.

Click on to indicate that you've done all the steps.