I'm having an issue getting a query to populate records based on the date range selected in my form.
I have a form that has 2 fields for dates (Start Date and End Date) so that when I run my reports I can specify the date range that I want to report off of. Both fields in the form are formatted as Short Date.
In my query I have a column that displays a reformatted date based on the completed date/time column from the table. Here's how I accomplished that:
DateValue([Completed])
Now in the criteria section of that column, I put in the following criteria so that I could select dates on my form and then when the query runs it will only display the records between the selected dates:
Between [Forms]![HomePage]![StartDate] And [Forms]![HomePage]![EndDate]
The issue that I'm having is that it doesn't return any records at all. I've checked to make sure that there are records that should be returning, the form field is setup as a date format (Short Date to be specific), after running the query as a Make Table query I've confirmed that the "Date" column in my query is coming through as a date value, and so I'm out of ideas as to what it could be.
Here's the SQL if that helps:
SELECT qryTTNewOrders.ContractNum_Ver, qryTTNewOrders.Type, qryTTNewOrders.SalesOffice, qryTTNewOrders.Submitted, qryTTNewOrders.Completed, qryTTNewOrders.[Turnaround Time], DateValue([Completed]) AS [Date]
FROM qryTTNewOrders
WHERE (((DateValue([Completed])) Between [Forms]![HomePage]![StartDate] And [Forms]![HomePage]![EndDate]));
Travis
Charter Media
I have a form that has 2 fields for dates (Start Date and End Date) so that when I run my reports I can specify the date range that I want to report off of. Both fields in the form are formatted as Short Date.
In my query I have a column that displays a reformatted date based on the completed date/time column from the table. Here's how I accomplished that:
DateValue([Completed])
Now in the criteria section of that column, I put in the following criteria so that I could select dates on my form and then when the query runs it will only display the records between the selected dates:
Between [Forms]![HomePage]![StartDate] And [Forms]![HomePage]![EndDate]
The issue that I'm having is that it doesn't return any records at all. I've checked to make sure that there are records that should be returning, the form field is setup as a date format (Short Date to be specific), after running the query as a Make Table query I've confirmed that the "Date" column in my query is coming through as a date value, and so I'm out of ideas as to what it could be.
Here's the SQL if that helps:
SELECT qryTTNewOrders.ContractNum_Ver, qryTTNewOrders.Type, qryTTNewOrders.SalesOffice, qryTTNewOrders.Submitted, qryTTNewOrders.Completed, qryTTNewOrders.[Turnaround Time], DateValue([Completed]) AS [Date]
FROM qryTTNewOrders
WHERE (((DateValue([Completed])) Between [Forms]![HomePage]![StartDate] And [Forms]![HomePage]![EndDate]));
Travis
Charter Media