me_100
Dec 14 2008, 09:01 PM
How to search the records by entering the "start date" & "end date" if my records have their own "start date" & "end date"?
E.g.
Project Start End
1 1/11/08 20/11/08
2 1/12/08 20/12/08
pbaldy
Dec 14 2008, 09:06 PM
What records would you want returned relative to the 2 dates entered? Start date between the 2, end date between the 2, any overlap, etc.
me_100
Dec 14 2008, 10:12 PM
um...
[Project] [Start date] [End date]
I want to return the Project done within the searching dates.
For say, Project 1 is from 1/11/08 to 20/11/08, so if I search 30/10/08 to 30/11/08, the result will be [Project 1,1/11/08,20/11/08]; And if I search 25/11/08 to 10/12/08, the result will be [Project 2, 1/12/08,20/12/08]
Thanks for yr patient
pbaldy
Dec 14 2008, 10:50 PM
Umm, then try this, presuming you're entering the criteria on the form:
SELECT...
FROM...
WHERE EndDate Between Forms!FormName.FromDateControlName To Forms!FormName.ToDateControlName
vtd
Dec 14 2008, 11:17 PM
me_100
Dec 15 2008, 01:18 AM
Why this does not work?
WHERE ((([Allowance Query].[Start date])<=[Please enter Start date]) AND (([Allowance Query].[End date])>=[Please enter End date]))
vtd
Dec 15 2008, 03:43 AM
Your condition only picks up the events that cover the whole parameter range. Basically, your condition only covers 1 of the 4 cases that should be selected.
That's why I posted the link to Allen Browne's article. Did you look at it???
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.