Responding to Data Events
Recordsets underlying forms and reports trigger data events when you move the record pointer or change the value in one or more cells of the Recordset. The most common use of data events is to validate updates to the Recordset; you add validation code to the event-handling subprocedure for the BeforeUpdate event. The use of code, rather than setting field-level or table-level ValidationRule property values, is that VBA provides a much more flexible method of assuring data consistency. Validation rules you write in VBA commonly are called business rules. Business rules often are quite complex and require access to multiple lookup tables—some of which may be located in other databases.
◂◂ See Validating Data Entry
Get Special Edition Using Access 97, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.