Date Search Query

Qualinwraith

Registered User.
Local time
Tomorrow, 00:50
Joined
Dec 12, 2005
Messages
26
I require to perform a query that returns all the records between two particular dates, a 'from' date and a 'to' date, both values take from text boxes within a form and both in the following format:

12/12/2005 15:26:00

Anybody has a clue?
 
Dates

In the query you have fromdate and todate fields. Under the criteria place the name of the corresponding form field. For instance, under the fromdate criteria put forms![myform].[fromdate]. Put the corresponding form text box name under Todate criteria and run the query.
 
Its always better to use Shortdate format unless you have specific reason to calculate time factor. This would make easy and fast display of data thur criteria.

Regards,
Ashfaque
 
The solution worked thanks but unfortunatley since I have time data within the Date field when I code in 17/10/2005>=[dtmOrder_Date] I get all the dates up to the 16th instead of the 17th of the month. Any solutions? I cannot remove the time data cause I am not the author of the data base that I am working on.
 

Users who are viewing this thread

Back
Top Bottom