Validation - comparing values from another table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • agiuga
    New Member
    • Oct 2007
    • 1

    Validation - comparing values from another table

    I am setting up a database of students, examination modules and a results table. Modules have a variety of different maximum marks. eg. one module may have a maximum of 50 while another 60. In the results table how do I ensure the mark input doesn't exceed the maximum possible as given in the module table?

    Thanks for your help
  • nico5038
    Recognized Expert Specialist
    • Nov 2006
    • 3080

    #2
    Originally posted by agiuga
    I am setting up a database of students, examination modules and a results table. Modules have a variety of different maximum marks. eg. one module may have a maximum of 50 while another 60. In the results table how do I ensure the mark input doesn't exceed the maximum possible as given in the module table?

    Thanks for your help
    Just record the max in the modules table.
    When calculating the results "top" the sum to the modules max when it's exceeding that value.
    By doing this in a query (or function), you're sure that even when a modules max is changed, the reports will show the correct value.

    Getting the idea ?

    Nic;o)

    Comment

    Working...