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

Query from one date to another 1

Status
Not open for further replies.

davidodell

Instructor
Jul 4, 2003
16
US
OK you guys and gals are great but here is another one what is the easiest way to query from one date to another. Like from 09/01/2003 through 09/30/2003. Or is there an easy way to set it up where you can prompt to enter the dates to query?

Thanks
David
 
In your query if you want to prompt for a date then it would be something like

..
where YourDateField between [Enter Start Date] and [Enter End Date]

Dodge20
 
If the dates are set then you just need to put that criteria into the query itself...something like this:

between #9/1/2003# and #9/30/2003#

If you want the user to enter the data something like this should work:

Between Format([Start Date],"mm/dd/yyyy") And Format([End Date],"mm/dd/yyyy")

You could also use a Form and call the text boxes on the Form from the query instead of using [Start Date] and [End Date]. Hope that helps.

Kevin
 
GoDawgs answer is better than mine. I forgot the format.

Dodge20
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top