I run a SELECT which shows which employees have birthdays coming in this and the next calendar month. The SQL used at present ends in
…… WHERE Month(DateOfBirth) = Month(Date()) OR Month(DateOfBirth) = (Month(Date()) + 1) MOD 12 ORDER BY Month(DateOfBirth), Day(DateofBirth), Surname
which gives me a sensible table with June’s birthdays before July’s, etc. except at this time of year – when the month numbers roll over MOD 12. So in the present list, the January birthdays (Month number 1) display before the December ones (Month number 12). Does anyone have a cunning bit of code please to improve the ORDER clause so that the months appear in the logical way throughout the year?
Thanks. – Mike –