• Validation rule on forms (Acc2000)

    Author
    Topic
    #387750

    I want the validation rule property on a text box control to show the message I put in the validation text property.
    I made the field “required” and put in a validation rule on the table end, and put the validation text there.
    I also put the same rule and text on the form control properties.
    It triggers, but the dialog that comes up is the standard error dialog that says “…tblOrders.ProjectInfo…” instead of my text: “Please enter Project Info”.
    Is there some trick to getting my custom text to show instead of the default error message?

    Viewing 0 reply threads
    Author
    Replies
    • #678082

      It seems from my testing that Access process the “required” property before it processes the validation rule.

      So if you violate both, you see the default error message caused by the required property, before you see the validation text you have set.

      By setting a validation rule of “Is Not Null” then I could set the Required property to “no” and see my custom error message when the field was left blank.

      • #678554

        John, thanks. I put all the validation in VB in the form module and it works well now.

    Viewing 0 reply threads
    Reply To: Validation rule on forms (Acc2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: