locked
Access (2010) Validation Rule RRS feed

  • Question

  • Hello,

    Forgive me if this is an answered question.

    For a textbox in a form for Access 2010, if a validation rule is added to the textbox's properties so that it is required ("Is Not Null"), am I correct in saying this rule will only be tested if the textbox has been updated?

    In testing, I find that the "Not Null" validation rule is applied, specifically, only when the control (1) has focus, (2) is updated to empty string, and then (3) loses focus. Tabbing in and then out of the control without updating the value will not even fire the rule as I find.

    It sure seems that validation rules will not definitely force required input if the user does not update the control or skips the control altogether. Is that correct?

    Do I need to write a VBA sub to check all controls that must have a value?

    Thanks,

    dfifita

    Thursday, July 31, 2014 1:07 PM

Answers

  • In most cases, yes. You normally use the BeforeUpdate event of the Form to Check for this. http://www.baldyweb.com/BeforeUpdate.htm

    Happy to help ! When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answered

    • Marked as answer by danishani Monday, November 10, 2014 11:34 PM
    Thursday, July 31, 2014 1:37 PM