Results 1 to 4 of 4
  1. #1
    C.Patterson is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Jun 2018
    Posts
    2

    Syntax error (comma) in query expression 'Invoice_Header.[IIf([Document_Date]<5/1/2018,"1%","2%")'.

    I keep getting the following error on my query: Syntax error (comma) in query expression 'Invoice_Header.[IIf([Document_Date]<5/1/2018,"1%","2%")'.




    This is my query: Rate: IIf([Document_Date]<5/1/2018,"1%","2%")


    If I take out the table field: Invoice_Header, the query goes through, but it marks everything as 2% even though I know that there are records going back to before May 1, 2018 that should be 1%.

    Any help would be appreciated.

  2. #2
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Literal dates must be delimited.

    Try
    Code:
    Rate: IIf([Document_Date]< #5/1/2018#,"1%","2%")

  3. #3
    C.Patterson is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Jun 2018
    Posts
    2
    Could have sworn that I tried that, but it worked this time! Thank you very much.

  4. #4
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Happy to help.....

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

Similar Threads

  1. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  2. Replies: 2
    Last Post: 03-08-2013, 12:59 PM
  3. Replies: 8
    Last Post: 03-05-2013, 01:20 PM
  4. Replies: 4
    Last Post: 07-25-2012, 04:01 AM
  5. Replies: 13
    Last Post: 12-05-2011, 05:10 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