• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5. Entering, Editing, and Valida... > Entering Personnel Actions Table Dat...

Entering Personnel Actions Table Data and Testing Validation Rules

You can experiment with entering table data and testing your validation rules at the same time. Testing database applications often requires much more time and effort than creating them. The following basic tests are required to confirm your validation rules:

  • Referential integrity. Type 25 in the paID field and 2 in the paInitiatedBy field of the default blank record (number 10) and then press the up-arrow key. Pressing the up-arrow key tells Access that you&err146;re finished with the current record and to move up to the preceding record with the caret in the same field. Access then tests the primary-key integrity before enabling you to leave the current record. If you&err146;ve turned off the Office Assistant, the message box shown in Figure 5.8 appears; otherwise the Assistant delivers the message. Click OK or press Enter.

    Figure 5.8. The message box indicating an entry that violates referential integrity rules.

  • No duplicates restriction for primary key. In the record just added, attempt to duplicate exactly the entries for record 9, and then press the up-arrow key. You see the message box shown in Figure 5.9, if you&err146;ve turned off the Assistant. Click OK or press Enter.

    Figure 5.9. The message box alerting you that a record has a duplicate key.

  • paType validation. Type x and press the right-arrow key to display the message box with the validation text you entered for the paType field (see Figure 5.10). Click OK or press Enter.

    Figure 5.10. The message box displayed when an entry violates a validation rule.

  • Type q and move to the paInitiatedBy field. When the caret leaves the paType field, the q changes to Q because of the > format character used. Type 0 (an invalid employee ID number), and press the right-arrow key to display the message box shown in Figure 5.11. Click OK or press Enter.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint