Show any activity falling between 2 time points.

  • Thread starter Thread starter Sue
  • Start date Start date
S

Sue

I want to design a query in which the user will be able to determine any
projects that were in process between 2 dates. I have 2 fields in the
underlying table, one being the StartDate, the second being the EndDate. I'm
stuck. Can you please help me with this one?

I do appreciate the tremendous resource you guys provide here. You've saved
my hash any number of times!
 
Basically you need criteria like the following.

For a project to be active during a period it must have started on or before
the end of the period and it must End on or after the beginning of the period.

WHERE ProjectStartDate <= PeriodEndDate and ProjectEndDate >= PeriodStartDate

In the query design view
Field: ProjectStartDate
Criteria: <= [Enter Period EndDate]

Field: ProjectEndDate
Criteria: >= [Enter Period StartDate]

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 
Back
Top