We will now return to the data entry application. We will introduce a check to make sure that married people are at least 12-years-old. In our data entry application, we will perform this check immediately after the keyer enters the marital status.
If you still have your cross tabulation application open from previous exercises, close it now. Select File -> Close from the main menu. CSPro may prompt you to save changes. Select Yes.
- Open the data entry application we created earlier. Click on
on the toolbar, or select File -> Open from the main menu. Click on the application name, MyEntry.ent, and click Open. - Get ready to write logic by clicking
on the toolbar, or pressing Ctrl+L or selecting View -> Logic from the main menu. - Press Ctrl+T to show names instead of labels in the forms tree.
- Click on the + next to PERSON_RECORD_FORM then click on the + next to PERSON_RECORD000 then click on MARITAL_STATUS. The frame on the right hand side of the screen should show PROC MARITAL_STATUS at the top.
- Note that PROC is short for procedure. We put our logic in the procedure for MARITAL_STATUS because we want it to execute immediately after the operator keys this field.
- Type in the logic code exactly as you see below.