I've come across a query someone created and it has criteria pulling dates.
Could someone explain to me this criteria: Like Get_Find
Field : oDate: Format([OccurrendDate],"yyyy-mm-dd"
Criteria: Like Get_FindOccurrenceDate()
thanks
Get_FindOccurenceDate() is a custom VBA function that is returning some
string value (assumption on what it is returning)
Like will use the returned value in a comparison against the field.
So if Get_FindOccurenceDate() returned
"1999*" all records for the year 1999 would be returned.
"1999-02*" all records for February of 1999 would be returned
"1999-02-01" all records for February 1, 1999 would be returned
"*-02-*" all records for February of every year in the data would be
returned.

Signature
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
.
> I've come across a query someone created and it has criteria pulling
> dates.
[quoted text clipped - 4 lines]
>
> thanks
bmac - 24 Mar 2008 17:07 GMT
Excellent!!
Taking it a step further could I use the following criteria this way?
Get_FindOccurrenceDate() & "2007*" or Get_FindOccurrenceDate() & "2008*"

Signature
bmac
> Get_FindOccurenceDate() is a custom VBA function that is returning some
> string value (assumption on what it is returning)
[quoted text clipped - 15 lines]
> >
> > thanks
John Spencer - 24 Mar 2008 18:47 GMT
Possibly. But since I have no idea what Get_FindOccurenceDate does or what
it returns, I can't tell if that will give you the data you want or not. I
can tell you that concatenating "2007*" on to the end is probably futile.
The only time that would return any records is if the function returned Null
or a zero-length string. If the function returned anything else you would
always end up with NO records returned based on the criteria.

Signature
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
.
> Excellent!!
> Taking it a step further could I use the following criteria this way?
[quoted text clipped - 20 lines]
>> >
>> > thanks