Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / March 2008

Tip: Looking for answers? Try searching our database.

Query using criteria Like Get_Find?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bmac - 24 Mar 2008 13:55 GMT
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
Signature

bmac

John Spencer - 24 Mar 2008 16:45 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.