Create a Validation Formula and Message

  1. In the Forms Designer, right-click the field or control for which you want to create a validation formula, then click Properties.

  2. Click the Validation tab in the Properties dialog box.

  3. Select the Validate this field before closing the form check box.

  4. In the Validation Formula box, type the formula that you want to use to evaluate user input.

  5. In the Display this message if the validation fails box, type the text that you want to appear in the message.

  6. Click OK.

For more information, see the following:

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.