Query Criteria Using Date Range

DBFIN

Registered User.
Local time
Yesterday, 20:34
Joined
May 10, 2007
Messages
205
I've created a simple query where I'm trying to extract only records with transaction date less than or equal to 9/1/2008. The query criteria asks for records where the transaction date is less than a form textbox date.

The query outputs records that do not meet the criteria. Why ?

<= [Forms]![SELECT REPORTING DATES]![box_transdate]
 
Last edited:
Since we can not see the data, we can not see the issue.

Please explain what is incorrect with the results. In what ways does the results not meet the criteria?


Are you maybe missing all records for the last day ( are you getting < not <=)?
 
Last edited:
Sometimes the solution is so simple that I miss it. "<= date" is not correct syntax in access. I changed it to "< date or = date". The query works fine. Thanks again for your help. I greatly appreciate it.
 
Last edited:
When you say 9/1/2008 does that mean to you September 1st or January 9th? It can make a big difference when working with Queries as you normally need to format the dates for queries into U.S. Date format (where 9/1/2008 is September 1st).
 
How do you format your queries to US format or otherway around

I have my dates going in as day/month/year but the query results comes out as month/day/year.


my SQL is

"Select * From View_Report_Job_List Where SaleDate >= #" & Date1 & "#"

Date 1 is input from user in format day/month/year
 

Users who are viewing this thread

Back
Top Bottom