simon551
IS-IT--Management
- May 4, 2005
- 249
Hi,
I have a query that filters records between dates based on form fields. The query is only returning the transactions in the months of the dates in the form fields.
Example:
The form dates are 1/1/2006 and 10/25/2006 and the query is only returning records with a date of January or October.
This is the criteria: Between [Forms]![frmSelections]![txtDate1] And [Forms]![frmSelections]![txtDate2]
And this is the field:
TransDate: Format([Date],"Short Date")
I had to put the format statement in there because the data was formatted as YYYY-MM-DD, but I didn't know how to handle that format.
The query w/out the criteria returns 1082 records. With the criteria, 147 records. All the records in the table are between 1/1/06 and 10/25/06.
?
I have a query that filters records between dates based on form fields. The query is only returning the transactions in the months of the dates in the form fields.
Example:
The form dates are 1/1/2006 and 10/25/2006 and the query is only returning records with a date of January or October.
This is the criteria: Between [Forms]![frmSelections]![txtDate1] And [Forms]![frmSelections]![txtDate2]
And this is the field:
TransDate: Format([Date],"Short Date")
I had to put the format statement in there because the data was formatted as YYYY-MM-DD, but I didn't know how to handle that format.
The query w/out the criteria returns 1082 records. With the criteria, 147 records. All the records in the table are between 1/1/06 and 10/25/06.
?