Although you say the expression for PayeBelow65 works, it contains more than one syntax error as pointed out by others previously.
Your handling of date ranges is wrong.
This should work correctly:
Code:
PayeBelow65: Nz(DLookUp("Younger6","t03PAYE","Salary02 Between [StartAmount01] And [EndAmount01] And DocumentDate10 Between #" & Format([StartDate05],"yyyy-mm-dd") & "# And #" & Format([EndDate02],"yyyy-mm-dd") & "#"),0)
Now for the VatRate99.
Date handling also wrong
You have spaces around [VatCode01] - remove these
Its not clear to me whether VatCode01 is a text or number field
If its a number field:
Code:
VatRate99: Dlookup("VatRate01","q02VatRate","VatCode01=" & VatCodePurchases01 & " AND DocumentDate01 Between #" & Format([StartDate11],"yyyy-mm-dd") & "# And #" & Format([EndDate13],"yyyy-mm-dd") & "#")
If its text:
Code:
VatRate99: Dlookup("VatRate01","q02VatRate","VatCode01='" & VatCodePurchases01 & "' AND DocumentDate01 Between #" & Format([StartDate11],"yyyy-mm-dd") & "# And #" & Format([EndDate13],"yyyy-mm-dd") & "#")
I should stress that although I've done this many times before I've not tested the above.
Hopefully no errors
It would be worth spending time how the various types of delimiters work together as you will use the ame ideas repeatedly
I recommend debugging by printing formulas to the immediate window so you can see how they work in practice.
I'd also recommend using more meaningful names than StartDate05 and StartDate11 etc ....