Criteria to include partial Year(Now())?

madwoman

Registered User.
Local time
Today, 23:50
Joined
Oct 20, 2005
Messages
20
I have a table with a field QuotationRef containing a series of values which include a year indicator (eg Q11101/06, Q11102/06, Q11103/06, Q11105/07, Q11106/07, Q11108/07) - where the characters after the / denote the year a Quotation was started. I need to be able to setup a criteria filter expression in my query design view that will allow me to select just the values in the QuotationRef field that relate to the current year.
I can set up a query that picks up this year's Quotations by using "Like "*/07"" but that will only solve the problem for this year and I need to setup a query that will change when the year changes. How could I do this, I have tried incorporating "Year(Now())" in the expression but this would filter on /2007 rather than /07.
Any advice please?
 
Would Format(Now, "YY") work?
 
In the criteria of the column, put:

Like "*/" & Format(Date(),"yy")
 

Users who are viewing this thread

Back
Top Bottom