Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2002
    Location
    Hartford, CT
    Posts
    106

    Unanswered: Validation Rule to accept only certain values

    Hi,
    I am creating a new table in MS Access 2003 and have a field that want to limit the user to enter only either P or N. I would like to put this in the validation rule field of field of the field properties. Can you please give a hint on the syntax of how to write that?
    Thanks
    Mo

  2. #2
    Join Date
    May 2009
    Posts
    258
    In the table design, just put the following for the value of the Validation Rule:
    Code:
    'P' Or 'N'
    You can specify the error message they receive in the Validation Text.

    It may also be nice to have the values in the lookup for the field as well:
    Display Control List Box
    Row Source Type Value List
    Row Source P;N

    Regards,

    Ax

  3. #3
    Join Date
    Oct 2002
    Location
    Hartford, CT
    Posts
    106
    Awesome.
    Thanks
    Mo

  4. #4
    Join Date
    May 2009
    Posts
    258
    No problem.

Posting Permissions

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