Validation Checks

Level – National 5+

Required Fields

Required fields cannot be be left empty (null).

  • Right-click on the Table name
  • Select “Modify table”
  • Tick the NN (Not Null) option for each required field:

Length, Range and Restricted Choice Checks

  • Right-click on the Table name
  • Select “Modify table”
  • Double-click the “Check” for each field that has a validation check.
  • Type in the rule for field.
    • Field names that include spaces must be inside quotation marks
    • Add the checks one at a time, saving after each one. This will make it easier to any mistakes.

length check:

length(surname) <= 15
length(postcode) between 7 and 8
length("Delegate Ref") = 4

Note: Don't use single apostrophes: length('name') is always 4 characters

   range check:

"Presentations Attending" <= 3
date_of_birth >= '2000-01-01'
appointment >= '09:00'

restricted choice:

eyesight = 'Natural' OR eyesight = 'Contact Lenses' OR eyesight = 'Glasses'
maxClassSize = 20 OR maxClassSize = 30

Example: