Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Sep 2001
    Location
    Pleasanton, California, USA
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Validation rule on forms (Acc2000)

    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?

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Validation rule on forms (Acc2000)

    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.
    Regards
    John



  3. #3
    Star Lounger
    Join Date
    Sep 2001
    Location
    Pleasanton, California, USA
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Validation rule on forms (Acc2000)

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •