Results 1 to 4 of 4
  1. #1
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038

    Form does not allow me to save record based on "validation rule"

    Experts:

    This is a fundamental question, yet it appears that I'm stumbling on how to resolve it.

    I have a numeric field with the following properties:
    Field size = Double
    Format = 0000000

    Also, I added a validation rule/text such as:
    - Validation rule: [Ra_BIN]<=7
    - Validation text: You must enter a 7-digit BIN (incl. leading zeros)

    Please see attached JPG for additional details.

    Now, in the associated form, I am adding, e.g., a Ra_BIN = to "1234567" (for testing purposes only). This BIN is a valid number (i.e., it's less or equal to 7 characters); however, when trying to add other field data, the table's validation rule kicks in and prevents me from saving the record. Why is that? Again, the data input (as far as I'm concerned) does not violate the rule given its 7 characters. What am I missing?

    Thank you,


    EEH
    Attached Thumbnails Attached Thumbnails Number_Field_Length.JPG  

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You aren't restricting the field length of 7 or less, you are restricting the field value to be 7 or less.
    Try:
    Code:
    LEN([Ra_BIN])<=7
    See here for more details: https://support.office.com/en-us/art...f-e3a0272e988d

  3. #3
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038
    JoeM:

    In hindsight, your solution makes total sense. Tested it and it now works as intended. Thank you for your help!

    EEH

  4. #4
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You are welcome!

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

Similar Threads

  1. Replies: 3
    Last Post: 07-23-2019, 12:43 PM
  2. Replies: 3
    Last Post: 02-13-2019, 01:49 AM
  3. Replies: 6
    Last Post: 06-24-2016, 06:07 AM
  4. Replies: 4
    Last Post: 04-28-2016, 02:11 PM
  5. Replies: 1
    Last Post: 05-29-2013, 04:01 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