I have an expression that returns the correct Tax deductable from an employee. Many months ago someone helped me to get this one right. The where condition has 2 parts. I need a very similar expression but for some reason don’t get it right.
This one is working fine.Paye03: DLookUp("[Younger65]","q02PAYE",[Salary04] & " Between [StartAmount] And [EndAmount] And #" & Format([DocumentDate07],"yyyy-mm-dd") & "# Between [StartDate05] And [EndDate02]")
Below is an image of the table and the expression I am trying but not working. Maybe it is something small I miss. Also an image of the query where I place the expression. In the table ignore EndDate04 and EndDate11. When suggesting use EndDate05.
Salary03: DLookUp("[Salary02]","t03SalaryReview", "Employ_ID06=" & EmployID AND #" & Format([DocumentDate10],"yyyy-mm-dd") & "# Between [StartDate07] And [EndDate05]")