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
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access