ACCESS query display: #Type!

Remi -  
 remi -
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 réponse

Thorak83 Posted messages 1140 Status Membre 156
 
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
0
Remi
 
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.
0
Thorak83 Posted messages 1140 Status Membre 156
 
Try this
=TRUEFALSE([TypePrestation]="Externe";([FinalCost])*0.2;Null)


Of course, Null must be allowed in the field.
0