Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2010
    Posts
    14

    Unanswered: New VAT/Tax rate without messing with previous

    Hi,

    In a cost query - I have Cost * 0.175 to work out VAT. I also have Date of Order as a field (short date). I want to be able to take account of the new VAT rate coming in in Jan, (20%) I tried below - creating in expression builder usng the IF stateent - but it says unidentified function 'iif' in expression.

    NewVAT: iff([Orders]![Order Date]>=31/12/10,"0.175","0.2")

    I want to be able to run invoices off from December 2010 in January and it choose the correct VAT rate, and be able to run new invoices from January with it picking the correct new 20% rate.

    any help gratefully received.

    Thanks

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    It's IIf, not Iff. You'll also need to surround the date with #, and I doubt you want quotes around the values.

    That all said, I would have a table with effective dates and rates. That would be a lot more flexible over the long haul than having to change code whenever the rate changes.
    Paul

  3. #3
    Join Date
    Sep 2010
    Posts
    14
    thanks paul, it works now - silly error to make.

    cheers

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Happy to help.
    Paul

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
  •