Results 1 to 5 of 5
  1. #1
    JeffGeorge is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    111

    Validation Rule

    I'm not sure if this is really a form or a table issue. I have the following Validation Rule for a table field that I am using in a form. My goal is to limit the entry to 3 case-specific words.



    Code:
    ="WAREHOUSE" Or "STORAGE" Or "QA" And <>"warehouse" And <>"storage" And <>"qa"
    The only entries this form will currently accept are WAREHOUSE, STORAGE, warehouse, and storage. It won't accept QA (or even qa).

    What is wrong with my logic? My goal is to allow only WAREHOUSE, STORAGE, or QA (in all caps).

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Not sure why you have the AND clause. Shouldn't it just be:
    Code:
    ="WAREHOUSE" Or "STORAGE" Or "QA"

  3. #3
    JeffGeorge is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    111
    I had the AND because I was trying to limit it to uppercase only. I want all entries by various people to be consistent. Except that it obviously doesn't care what case is used in this instance. I don't know how to convert or limit all entries to uppercase.

  4. #4
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    If all the data entry is happening through a form, I would approach this differently. Just have it automatically convert all entries to upper case as they happen.
    Here is a thread which shows you a few different ways of accomplishing that: http://answers.microsoft.com/en-us/o...c-68b599b31bf5

  5. #5
    JeffGeorge is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    111
    That was a good tip and helped me put in a solution. Thanks!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Validation Rule
    By Sanjo in forum Forms
    Replies: 2
    Last Post: 12-10-2013, 11:02 PM
  2. Validation Rule
    By noob123 in forum Access
    Replies: 1
    Last Post: 12-02-2013, 03:39 PM
  3. Validation Rule
    By Christopher in forum Forms
    Replies: 15
    Last Post: 04-20-2010, 06:05 AM
  4. Validation Rule
    By robomose in forum Access
    Replies: 1
    Last Post: 09-09-2009, 05:59 AM
  5. Validation Rule
    By smitstev in forum Access
    Replies: 5
    Last Post: 06-30-2009, 09:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums