Show All

Validate data by using an event procedure

  1. Open the form in Design view.
  2. Display the property sheet for the form and then click the Event tab.

  3. Click the event property for the event that you want to trigger the procedure.

    For example, to trigger the validation rule when a control is updated with changed data, create an event procedure for the control's BeforeUpdate event.

  4. Click Build next to the property box to display the Choose Builder dialog box.

  5. Double-click Code Builder to display the event procedure window.

  6. Add Microsoft Visual Basic for Applications code to the event procedure, specifying the validation condition and the operations to perform when those conditions are met.

Notes