How to query table in certain date format

G

gcapp

Can someone help me?

I have a table that I am trying to run a query off of. The table has
field that is in Date/Time format and the date is shown as "99/99/00
format or "10/24/06".

In my query, I would like to have a parameter where you have to choos
the year. But I would like it if the parameter could be entered a
just the year, like "2005". Problem is when I do that, it does no
grab any records and there are plenty in there for 2005. I assum
because of the format of the field.

So how can I setup the parameter to have the year entered and have al
the records from that year appear, without changing the format of th
field in the table??

Any help would be appreciated
 
J

John Spencer

If the field is a date time field, you should be able to use something like
the parameter criteria below. If the field is a text field, then you will
need to do something a bit different

Field: YourDateField
Criteria: <= DateSerial([What Year?],1,1) and <DateSerial([What
Year?]+1,1,1)

Field: YourStringFieldThatLooksLikeAdate
Criteria: Like "*/" & ([What Year?] Mod 100)
 
Top