Results 1 to 2 of 2
  1. #1
    muhijo is offline Novice
    Windows XP Access 2007
    Join Date
    May 2013
    Posts
    1

    Date/time Fields, Validation Rule "invalid SQL Syntax - Cannot Use Multiple Columns

    Using: Access 2007



    Hi,

    1) Should be a simple question: I want to set a validation rule for two fields (Date/Time). Both input masks are "99.99.00;0;_". Always error "Invalid SQL syntax - cannot use multiple columns in a column-level CHECK constraint." if i wanna save the table.

    ([Enddate] Is Null) Or ([Enddate]>=[Startdate]). Enddate should either left blank or should not before the enddate. Where is my fault?


    2) I want to set a validation rule which allows [Field1] (text) if [Field2] is set "No" (Yes/No Type) no entry in [Field3] (Number). If [Field2] is set "Yes", an entry in [Field3] is possible.

    Hope you can help me.

    best regards,
    muhijo

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I don't know that you can do those with a validation rule. I'd use the before update event of a form:

    http://www.baldyweb.com/BeforeUpdate.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Multiple Validation Rule
    By gatsby in forum Access
    Replies: 20
    Last Post: 01-15-2013, 05:24 AM
  2. Validation rule for time
    By jle0003 in forum Access
    Replies: 3
    Last Post: 05-22-2012, 02:45 PM
  3. Replies: 1
    Last Post: 03-28-2012, 10:01 AM
  4. Replies: 13
    Last Post: 12-05-2011, 05:10 AM
  5. Validation Rule: Date
    By krymer in forum Access
    Replies: 0
    Last Post: 08-27-2008, 03:30 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