You could enter "200[2-7]" in response to the prompt. That should find
every record where the field contains 2002, 2003, 2004, 2005, 2006, or 2007.
The real problem here is that you are storing multiple values in one field,
so it is tough to search properly.
If you wanted All the 2000 dates, you could Enter "200#" as the response.
All years ending in 9 "###9"
All years in the 21st century ending in 9 - "20#9"
If you wanted to get the odd years from 2000 to 2010 - "200[13579]"
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
Sadie said:
Thank you for responding so quickly.
The field is a text field. I am able to query on one year by using the
following criteria. This shows me every row where that year is in the
field.
Like "*" & [Enter four digit year:] & "*"
Is there any way of adjusting this criteria to show all rows where years
between say 2002 and 2007 are in there?
Sadie
Allen Browne said:
So you imported the data from Works into an Access table.
Open that table in design view.
This "date" field: is it a Date/Time type? Or a Text type field?
That will make a difference to what you need to do here.
If it is a Date/Time field, you will be able to filter it just by
creating a
query, and typing the dates into the Criteria row under the field.
If it is a Text field, you will need to convert it to a Date/Time field,
either in the table or in the query, before you can work with the data
reliably. Post back if you need more detail on this.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Reply to group, rather than allenbrowne at mvps dot org.
Hello, you were kind enough to answer my question regarding date
criteria
in
queries using data from a works database where there are several dates
in
the
format dd.mm.yyyy in one field. Could someone please help me to
develop
the
query so that years between say 2002 and 2007 can be selected in one
query?
Your help would be most appreciated.