Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2003
    Posts
    83

    Unanswered: help with validation rule

    I am a novice to Access. I have to validate the user entry in a field. The allowed values in the field should be in multiple of 100's. If a user enter the value in a field as 205 or 207, a msgbox should popsup saying that to enter only in multiple's of 100's, or any sort of validation will do. Hope it is clear.
    any help is greatly appreciated.

  2. #2
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Smile Re: help with validation rule

    Originally posted by skodidhi
    I am a novice to Access. I have to validate the user entry in a field. The allowed values in the field should be in multiple of 100's. If a user enter the value in a field as 205 or 207, a msgbox should popsup saying that to enter only in multiple's of 100's, or any sort of validation will do. Hope it is clear.
    any help is greatly appreciated.
    Use the Validation Rule property for the field in your table. Like "?00" should do it. Then enter in quotes, in the Validation Text property, the text you want to be displayed when the user tries to enter the wrong value.

    Gregg

  3. #3
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Or you could treat the value as a number and perform a modulus looking for any remainder ...

  4. #4
    Join Date
    Sep 2003
    Posts
    83

    Re: help with validation rule

    Originally posted by basicmek
    Use the Validation Rule property for the field in your table. Like "?00" should do it. Then enter in quotes, in the Validation Text property, the text you want to be displayed when the user tries to enter the wrong value.

    Gregg
    Thanks a lot Gregg, it worked.

  5. #5
    Join Date
    Sep 2003
    Posts
    83

    Re: help with validation rule

    Originally posted by skodidhi
    Thanks a lot Gregg, it worked.
    But, got another issue now. If I tries to delete the value or closes the form without saving it, the validation text message keeps popping up.
    any idea, how to handle this.

  6. #6
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Question Re: help with validation rule

    Originally posted by skodidhi
    But, got another issue now. If I tries to delete the value or closes the form without saving it, the validation text message keeps popping up.
    any idea, how to handle this.

    With what I tried I was able to close the form and delete the contents of the field without the message popping up. The only time it gave me message was when I entered a value that did not match the pattern set up in the Validation Rule property. What are the other property settings for the field?

    Gregg

Posting Permissions

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