have you seen this? https://www.accessforums.net/tutoria...nts-14417.html
breaking it out, you see this:
Code:
IIf([Qualifying Car]=True And [Selling VAT rate]="20",
([Sale Price]*11/66),
IIf([Qualifying Car]=True And [Selling VAT rate]="17.5",
([Sale Price]*7/47),
IIf([Qualifying Car]=False And [Selling VAT rate]="20",
([Profit]*11/66),
IIf([Qualifying Car]=False And [Selling VAT rate]="17.5",
([Profit]*7/47)))))
so that will tell you right there where the issue is. You have NO false argument in your last nested IIF(). The way you have it written now, it should look like:
Code:
IIf([Qualifying Car]=True And [Selling VAT rate]="20",
([Sale Price]*11/66),
IIf([Qualifying Car]=True And [Selling VAT rate]="17.5",
([Sale Price]*7/47),
IIf([Qualifying Car]=False And [Selling VAT rate]="20",
([Profit]*11/66),
IIf([Qualifying Car]=False And [Selling VAT rate]="17.5",
([Profit]*7/47), value if none of above satisfy))))
But it would be easier to read if you just wrote:
Code:
IIf([Qualifying Car]=True
IIF([Selling VAT rate]="20",
([Sale Price]*11/66),
IIF([Selling VAT rate]="17.5",
([Sale Price]*7/47),
[value if qualifying car and vat rate <> above values])),
IIf([Selling VAT rate]="20",
([Profit]*11/66),
IIf([Selling VAT rate]="17.5",
([Profit]*7/47), value if NOT qualifying care and vat rate <> above values)))
But really what you should do is put this in VBA, under a form's record event of somekind because it would greatly reduce the text you have to look at. See the FAQ for how to do that. Also, you should really wrap multiple math-based operations in (). Simply due to order of ops if it applies, but in your calcs above it does not. It's always easier to read though.