Why does this query
Expand|Select|Wrap|Line Numbers
- SELECT DISTINCT Patients_eMD_qry.[eMD Patient], Year([born]) AS BirthYr
- FROM Patients_eMD_qry
- WHERE (((Year([born]))=Year([born])))
Of course I don't really want to test Year(born) against itself. I was testing against the year of a text box entry and various tests led me to this. This just looked like the best way to highlight the absurdity of the situation.
Got similar error result with datediff(). If I remove the criteria, I see the birth years range from 1900 to 1998. I can even test for a literal year, i.e. 1928, and it still fails.
Using Access 2007, all service packs installed.
Jim