Can you query a range of dates with a range of dates

Parametech

New member
Local time
Today, 11:40
Joined
Mar 18, 2008
Messages
2
I have a client that wants to enter a range of dates in a query of when they will call that person back. Then they want to be able to type in a range of dates and have a make table query show them all the people that fall in between these two dates....is this even possible???
Ex.
Joe March 3 to March 8
Mary March 4 to March 9
John March 5 to March 10

So if they type into the query March 3 to March 6 all three people should show up because one of the dates specified lies within the parameters they are asking for.....man I am out of ideas

Anyone.....
 
Query a range of dates with a range of dates

I have a client that wants to enter a range of dates in a query of when they will call that person back. Then they want to be able to type in a range of dates and have a make table query show them all the people that fall in between these two dates....is this even possible???
Ex.
Joe March 3 to March 8
Mary March 4 to March 9
John March 5 to March 10

So if they type into the query March 3 to March 6 all three people should show up because one of the dates specified lies within the parameters they are asking for.....man I am out of ideas

Anyone.....
 
Try a query like the following:

SELECT *
FROM [TableName]
WHERE [EndDate]>=[Enter range start] and [StartDate]<=[Enter range end]
.
 
pretty well everything is possible - you may be able to get what oyu want directly from a query, or you may need an intermediate table, as you suggest

if you use an intermediate table, it may be easier to create a standard table beforehand, and just clear it, when you need to reuse it

docmd.runsql "delete * from temptable"

rather than recreate one each time. Especially do it this way if you need it indexed.
 

Users who are viewing this thread

Back
Top Bottom