2.4 Adding an Entry Field
Next, add an entry field. The
entry field will contain the customer number.
Follow these steps:
- Choose the Entry field
icon
from the Parts Palette window.
- Click on this icon and move the
pointer to the right of the Static text part. Click on the left mouse
button.
- Double-click on this part with the
left mouse button. The Properties notebook appears.
- 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.
- Make sure that there is no text in
the Text field for this part.
- Click on the Data
tab. Change the length to 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.
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.
- Click OK to save
and close the notebook.
The Customer Inquiry window
should now look like the following:
You can access help from the
design window.
Follow these steps:
- Right click on the Entry
Field part in your Customer Inquiry window.
- Select Events
from the pop-up menu.
- Highlight the LOSTFOCUS
event and press F1. The help window appears.
- Click on the system window icon to
close the window.
Click on
to indicate that you've done all the steps.