Color scheme: Dark
You are here: start » en » Documentation » Microsoft Access development tools » WKL Forms Object Library » WKL Forms Object Library troubleshooting » The validator checks nothing

The validator checks nothing

A WklValidator on a form has rules, but leaving a field or saving a record is never rejected, and no field is marked.

Environment

WKL Forms Object Library 1.31 and later. Microsoft 365 Access, 32-bit or 64-bit; other versions aren't supported.

Cause

Access passes the events of a form and its controls to another control only when the form has a module. The validator listens to those events; on a form whose Has Module (HasModule) property is No, it doesn't receive any, even when the event properties say [Event Procedure]. The validator then shows “Validation inactive: the form … needs a module” in its rectangle, and IsConnected is False.

Two other causes produce the same symptom for individual events:

  • An event property of the form or of a checked control contains a macro or an expression instead of [Event Procedure]: Access passes that event only to the macro.
  • A rule names a field that has no control on the form: the field is checked before the record is saved, but there's no control to leave and nothing to mark.

Resolution

  1. Open the form in Design view and set Has Module to Yes on the Other tab of the property sheet. An empty module is enough; the validator sets the event properties itself.
  2. If the form's Before Update, After Update, On Error, On Current, or On Undo property, or a checked control's Before Update property, contains a macro, replace it with [Event Procedure] and call the macro from the procedure.
  3. Check the names in the rules against the controls (the designer's Field rules page lists the form's controls), and then open the form again. IsConnected is True when the validator is listening.
en/wiki/msaccess/comctl/troubleshooting/validator-checks-nothing.txt · Last modified: by Wolfgang van der Stille