** in a form there is a text box where one has to key in the year (.txtYear.value="2016") ** A.paystart is a datefield in ORlist table local ldYear With Thisform ldYear = .txtYear.Value endwith SELECT A.paystart, A.clientID, B.ClientName, A.Amount FROM ORlist as A Left Join Client as B ON A.ClientID=B.ClientID; WHERE YEAR(A.paystart)=VAL(ldYear) INTO CURSOR CollectAmt ORDER BY A.clientidThe results displays everything for any other year except "2017" and I have no idea why is it like this for this particular year 2017 and would always result into an operator/operand type mismatch error message.