Results 1 to 2 of 2
  1. #1
    Theremin_Ohio is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2011
    Location
    Chillicothe, OH
    Posts
    12

    Unhappy Multiple Validation Rules


    Hello,

    I need to input two validation rules for date fields. Here are the specifics:

    1. Field1 is called [Purchase_Date]. Any data must be in or after 1959, so the validation rule I entered is >#12/31/1958#.

    2. Field2 is called [Labor_Date]. Any data must be not only in or after 1959, but must also be on or after [Purchase_Date] (labor cannot be performed until after payment is received). I initially thought I may need two validation rules, both >#12/31/1958# and [Labor_Date]>=[Purchase_Date].

    Is this even close to right? When I typed these codes concurrently into the validation rule box for Field2, I came up with a syntax error. I then tried just the latter rule by itself, knowing that the Purchase_Date used as a comparison in Field2 is already after 12/31/1958. Still came up with a syntax error. Help!

    Thank you in advance.
    Last edited by Theremin_Ohio; 03-29-2011 at 09:18 PM. Reason: Tried another method but still no solution

  2. #2
    QAFQUNAM2001 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    1
    I THINK YOU ARE OVER COMPLICATING A LITTLE BIT, IF YOU HAVE ALREADY ESTABLISHED A VALIDATION RULES THAT PROHIBITS DATES BEFORE 1959 IN THE FIELD [Purchase_Date], THE ONLY THINK YOU NEED IS TO MAKE SURE THAT [Labor_Date]>=[Purchase_Date], WITH THIS VERY SYNTAX, HOWEVER, THE WAY YOU WOULD DO IT IS SOMETHING LIKE THIS:
    ([Labor_Date]>=[Purchase_Date])=([Purchase_Date]>#12/31/1958#)
    REMEMBER THAT VALIDATION RULES ACT EVALUATING BOOLEAN RESULTS, IF [Labor_Date]>=[Purchase_Date] THEN THE RESULT IS TRUE AND IF [Purchase_Date]>#12/31/1958#, IT ALSO IS TRUE, AND THE COMPARISON TRUE=TRUE IS ALSO TRUE, SO YOU'LL BE ABLE TO WRITE DATA.

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

Similar Threads

  1. Textbox data validation rules.....
    By smorelandii in forum Access
    Replies: 1
    Last Post: 02-01-2011, 09:52 PM
  2. Updateable query rules
    By gg80 in forum Queries
    Replies: 7
    Last Post: 01-05-2011, 11:50 PM
  3. Replies: 2
    Last Post: 10-23-2010, 09:38 AM
  4. Validation Rules
    By esglover in forum Database Design
    Replies: 1
    Last Post: 07-23-2010, 08:02 PM
  5. Validation rules question
    By cps6568 in forum Access
    Replies: 3
    Last Post: 01-12-2010, 02:01 PM

Tags for this Thread

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