in reply to Re: Re: Type casting
in thread Type casting

Although you want $year to be treated by the database as a number, you've put single quotes around it in the SQL, which tells the database the value is a string.

Try removing the single quotes around $year in the SQL, and maybe even using placeholders instead, if MS Access supports them.