0

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%.

What am I doing wrong?

2
  • can you construct an example that can be shared? Is the error referring to invoice_Header or referring, or does Rate: IIf([Document_Date]<5/1/2018,"1%","2%") gives you an error as well?
    – Kasumi
    Jun 7, 2018 at 1:25
  • The query is referencing a column called Document_Date in a table called Invoice_Header. This column contains dates. Does this info help? Jun 7, 2018 at 1:43

1 Answer 1

0

Got a tip on another forum. . . something I had tried, but for some reason it worked this time. I delimited the date.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.