Results 1 to 2 of 2
  1. #1
    sra2786 is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Oct 2017
    Location
    Cincinnati, OH
    Posts
    38

    Validation rule to check for a space


    I need a validation rule that checks that the data is in the following format
    [A-Z][A-Z][A-Z][A-Z]space[0-9][0-9][0-9][0-9][0-9]
    I don't know how to include the space between the first four characters and the last five digits
    Thanks.
    Sandy

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Try:

    LIKE "[A-Z][A-Z][A-Z][A-Z][ ][0-9][0-9][0-9][0-9][0-9]"

    At least that works in my test in Immediate Window.

    Perhaps InputMask would be better approach.

    However, Access is not case-sensitive by default. If you want to enforce UPPER CASE will need VBA to convert alpha inputs to UPPER CASE regardless of approach to validate data.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 4
    Last Post: 12-05-2017, 03:31 PM
  2. Replies: 2
    Last Post: 06-16-2015, 03:52 AM
  3. Replies: 2
    Last Post: 01-11-2014, 03:56 PM
  4. Validation Rule
    By noob123 in forum Access
    Replies: 1
    Last Post: 12-02-2013, 03:39 PM
  5. Validation Rule Help!
    By confidego in forum Access
    Replies: 8
    Last Post: 07-20-2011, 12:54 PM

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