ACCESS query display: #Type!

Hello,

I am executing a query to display a field based on criteria like this:

=TrueFalse([TypePrestation]="Externe";([FinalCost])*0.2;" ")

when I run the query I get #Type! in the field: does anyone have an idea? It seems to me that the syntax is correct

thank you

<config>Windows 2012 R2, Microsoft ACCESS 2013

1 answer

  • Votes
  • Date
  • Descending date
  1. Hello,
    if it's a numeric field (given the FinalCost*0.2) then the " " is impossible. better to put 0.
    =TrueFalse([ServiceType]="External";([FinalCost])*0,2;0)

    --
    Best regards,
    Thorak83
    1. Thank you Thorak83
      Indeed, the FinalCost is a net price that I multiply by 0.2 to obtain the amount of VAT.
      If I put 0 instead of " ", it will display 0.
      I want the field to be empty if the TypePrestation is not equal to Externe.
    2. Try this
      =TRUEFALSE([TypePrestation]="Externe";([FinalCost])*0.2;Null)


      Of course, Null must be allowed in the field.
    3. A numeric field cannot be empty ("") but can be Null.
    4. I tried this syntax; the query always returns #Type! instead of finalcost * 0.2.
    5. What type is the FinalCost field
      Text - Numeric ...
      is truefalse used in a query?