Search for dates

J

jerry

I have a table with a startdate and an enddate.
ex. 04/30/04, 04/30/05
I have a form that opens a report with a where statement
DoCmd.OpenReport stDocName, acPreview, , ["startDate] between #" &
Me.DTPicker1 & "# And #" & Me.ActiveXCtl2 & "#"

Is there a way to open the report so I can search on both the startdate and
enddate in the where statement.
 
A

Al Camp

Jerry,
If I understand correctly... in aircode...
Where (StartDate Between Date1 AND Date2) AND (EndDate Between Date1
AND Date2)
hth
Al Camp
 
J

jerry

Al, I had to use or instead of and but it works great.
Thank you
--
jerry


Al Camp said:
Jerry,
If I understand correctly... in aircode...
Where (StartDate Between Date1 AND Date2) AND (EndDate Between Date1
AND Date2)
hth
Al Camp

jerry said:
I have a table with a startdate and an enddate.
ex. 04/30/04, 04/30/05
I have a form that opens a report with a where statement
DoCmd.OpenReport stDocName, acPreview, , ["startDate] between #" &
Me.DTPicker1 & "# And #" & Me.ActiveXCtl2 & "#"

Is there a way to open the report so I can search on both the startdate
and
enddate in the where statement.
 
Top