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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax for Between Criteria Not Working 1

Status
Not open for further replies.

Mike555

Technical User
Feb 21, 2003
1,200
US
I'm using the following query. The query errors out on the bolded line containing the Between statement. The DateOpened field is a date/time format. I need to capture records with a DateOpened equal to today's date, and that's why I'm attempting to pull anything BETWEEN TODAY AND TOMORROW.

WHERE ((([quantity]-[qtyshipped])>0) AND
((qryOrder.StatusID)=5 Or (qryOrder.StatusID)=6) AND
((qryOrder.OrderID)=[tblorderdetail].[OrderId]) AND
((qryOrder.DateOpened)=Between Date() And Date() + 1))

What is wrong with this? Thanks.

--
Mike
 
Dont' use both "=" and "Between"
((qryOrder.DateOpened) Between Date() And Date() + 1)

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top