Search for dates

G

Guest

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top