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

Date selection Query

Status
Not open for further replies.

Monguse

Programmer
Mar 11, 2002
63
US
I wrote a query that looks at the database and pulls data based on a date range entered from two different fields. the only way I could make it work was you had to enter the date range twice - once for each field. (see query below)

I wanted to find out if ther is anyway to only have to enter the date range one time - yet have Access use the date to search each field.


SELECT [RGC STARTS_1].BUILDER, [RGC STARTS_1].[TRACT], [RGC STARTS_1].[LOT #], [RGC STARTS_1].[TRIM DATE], [RGC STARTS_1].[TENT DATE], [RGC STARTS_1].[AMOUNT]
FROM [RGC STARTS_1]
WHERE ((([RGC STARTS_1].[TRIM DATE]) Between [Enter Earliest Trim Date:] And [Enter Latest Trim Date:]) or (([RGC STARTS_1].[TENT DATE]) Between [Enter Earliest Tentative Date:] And [Enter Latest Tentative Date:]));
"The beauty of the second amendment is, that it will not be needed until
they try to take it." - Thomas Jefferson
 
...
WHERE ((([RGC STARTS_1].[TRIM DATE]) Between [Enter Earliest Date:] And [Enter Latest Date:]) or (([RGC STARTS_1].[TENT DATE]) Between [Enter Earliest Date:] And [Enter Latest Date:]));
 
Thanks for the help, I just got back to the project today and you 'WHERE' statement works great.

Thanks Again "The beauty of the second amendment is, that it will not be needed until
they try to take it." - Thomas Jefferson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top