A
Andreas
I have a subform attached to a query which includes some variables defined
inside the query (i.e TotVAT: [Qty]*[Price]).
In my subform I have a boolean variable for VAT. When the checkbox is
checked, I want the value of VAT to be calculated. If not, VAT must be 0. To
do this, I have in my query 2 variables: VAT which is an actual variable
from the table (True/False) and TotVAT which is defined in the query as
explained above.
Then I try to enter the following statement either in the control souce or
in the default value of TotVAT:
= IIF([VAT] = "True", CCur([TotQty]*0,25, 0)
I get error message: You omitted an operator or an operant, .. invalid
character or comma, quotes, double quotes, etc.
I also tried:
= IIF([VAT] = "True", (CCur([TotQty]*25), 0)
= IIF([VAT] = "True", "CCur([TotQty]*25", "0")
but the error is always the same.
What do I have to do?
inside the query (i.e TotVAT: [Qty]*[Price]).
In my subform I have a boolean variable for VAT. When the checkbox is
checked, I want the value of VAT to be calculated. If not, VAT must be 0. To
do this, I have in my query 2 variables: VAT which is an actual variable
from the table (True/False) and TotVAT which is defined in the query as
explained above.
Then I try to enter the following statement either in the control souce or
in the default value of TotVAT:
= IIF([VAT] = "True", CCur([TotQty]*0,25, 0)
I get error message: You omitted an operator or an operant, .. invalid
character or comma, quotes, double quotes, etc.
I also tried:
= IIF([VAT] = "True", (CCur([TotQty]*25), 0)
= IIF([VAT] = "True", "CCur([TotQty]*25", "0")
but the error is always the same.
What do I have to do?