sort date between?

daveee143

Registered User.
Local time
Today, 05:04
Joined
Apr 30, 2011
Messages
24
how can i sort date between dates? but the date is came form the user?? :confused::confused:

Example: 03/14/2007 - 03/15/2008
 
You haven't really provided enough information for anyone to give you a usable answer.

Are you trying to say that you want a user to be able to enter a date range and have a query return records for that range?

More info please!
 
You haven't really provided enough information for anyone to give you a usable answer.

Are you trying to say that you want a user to be able to enter a date range and have a query return records for that range?

More info please!

thats waht i'm talking for example:

user input date from 2000-2009

all data in year 2000 up to 2009 will appear? how can i do these?
 
For example;

Create a form with two text boxes where the users can enter the beginning and ending year values. Create a query that returns all the fields you want, including the relevant date field. In the criteria row of the relevant date field use the Between operator and the Year function to reference the text boxes on the form. The SQL might look like;

Select [YourDateField], [SomeOtherField], Year([YourDateField]) As TheYear From YourTable
Where Year([YourDateField]) Between Forms!YourForm!TextBox1 And Forms!YourForm!TextBox2
 

Users who are viewing this thread

Back
Top Bottom