Performing a calculation based on a field value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello, I'm very new to Access and need some help pleas:

I'm trying to calulate VAT and put this on the form, but only if the
supplier name does NOT contain the characters JCA.

So in English logic it would look something like this:

=if([Supplier Name] Not Like 'JCA') THEN [Text44]*0.175 ELSE 0

So if the supplier name does not contain the chars JCA, calulate the VAT and
put this value in the field. Otherwise don't calulate VAT and simply put 0
value in the field.

Now can anyone help me put this into Access 'speak' in the expression builder?
 
Craig said:
Hello, I'm very new to Access and need some help pleas:

I'm trying to calulate VAT and put this on the form, but only if the
supplier name does NOT contain the characters JCA.

So in English logic it would look something like this:

=if([Supplier Name] Not Like 'JCA') THEN [Text44]*0.175 ELSE 0

So if the supplier name does not contain the chars JCA, calulate the VAT and
put this value in the field. Otherwise don't calulate VAT and simply put 0
value in the field.

Now can anyone help me put this into Access 'speak' in the expression builder?


Skip the expression builder, you're already very close:

=IIf(([Supplier Name] Not Like '*JCA*'), Text44*0.175, 0)
 
Back
Top