Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date searches in Access

Status
Not open for further replies.

Silenus69

Programmer
Jul 10, 2002
4
US
I am constructing an ASP application that will allow users to pull data from a specific date range in an access database. I am using the following SQL Query:

adorecord.open "select * from apsqa",adoconn
adorecord.filter= &quot;s2>= #&quot; & std & &quot;# AND s2<= #&quot; & edd & &quot;#&quot;
std = the beginning date
edd = ending date
s2 is the date field in the database table
Both edd and stm are DIM'ed as date

When I run this query, It return ALL dates, even those that lie outside the range....Any suggestions?

Dan
 
Try this

adorecord.open &quot;select * from apsqa where s2 between #&quot; & std & &quot;# AND #&quot; & edd & &quot;#&quot;,adoconn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top