Validation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • db5pta
    New Member
    • Mar 2008
    • 4

    Validation

    I have two tables based on bike hire. One table is hire and the other is category(of bike).

    The 'Category' table has a 'MaxAvailable' for each bike.

    The 'Hire' table has a 'Quantity' of bikes hired box.

    I need to put validation into the Hire table in 'Quantity' field that says it cannot be more than the 'MaxAvailable' field in the 'Category' table.

    HELP please.

    much appreciated.

    Paul
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32661

    #2
    I think what you need is some code in your BeforeUpdate event procedure that checks the other table using a DLookup() call and sets Cancel = True if the value is beyond the valid values.

    Comment

    Working...