How do you write a MS Access query criteria that looks for records like the current year only for a date field ? I tired Like *Year(Now()), it did not work. Thanks ! ! !
Thanks for responding ! ! ! I would like to grab the year from the computer to eliminate the need modify the query every year . . . with a 'LIKE' statement.
This criterion requires that every record in the table be processed to extract the year from the date before comparing it to the current year.
Using Between allows the engine to select the dates directly from the field's index, return those between the two values calculated in the criteria. The functions are applied only to the criteria, rather than the records.
It is vitally important to realise the difference because Between can be literally hundreds of times faster. The difference only becomes noticable as the number of records increases so what starts out working fine becomes painfully slow over time.