Access 2016
I've created a query of 2 identical tables, combining different years of data.
There is a text field called "Loss Reported". Sample Data "1/1/2018 1:10:25 PM"
I created a new field in the query from "Loss Reported" to trim to time and convert the data to a true date (this works fine): New Job Date: (CDate(Format([Loss Reported],"mm/dd/yyyy")))
Next I want to query the date range, real simple 1/1/2020 to 12/31/2020, with a parameter.
This works
>=#1/1/2020# And <=#12/31/2020#
This doesn't
>=[Start Date] And <=[End Date]
What am I doing wrong? Any help is appreciated. Trying to have annual sales reports done this week.
Here's the SQl query if it's easier to solve (I haven't messed with the SQL Query.
SELECT [All Jobs Data].[(Do Not Modify) Invoice], [All Jobs Data].[(Do Not Modify) Row Checksum], [All Jobs Data].[(Do Not Modify) Modified On], [All Jobs Data].[Job #], [All Jobs Data].[Job Name], [All Jobs Data].[Job Type], [All Jobs Data].[Loss Reported], (CDate(Format([Loss Reported],"mm/dd/yyyy"))) AS [New Job Date], [All Jobs Data].Adjuster, [All Jobs Data].Contractor, [All Jobs Data].[Customer Contacted], [All Jobs Data].[Site Inspected], [All Jobs Data].[Rush Delivery Date], [All Jobs Data].[Invoice Sent], [All Jobs Data].[Program Complete Date], [All Jobs Data].Billed, [All Jobs Data].[Textiles Billed], [All Jobs Data].[Electronics Billed], [All Jobs Data].Received, [All Jobs Data].[Balance Due], [All Jobs Data].[Address 1], [All Jobs Data].[Address 2], [All Jobs Data].City, [All Jobs Data].State, [All Jobs Data].Zip, [All Jobs Data].[Bag Count], [All Jobs Data].Contaminant, [All Jobs Data].[Total Pieces Cleaned], [All Jobs Data].[Total Pieces Not Restored], [All Jobs Data].[Sales Rep], [All Jobs Data].[Sales Rep Commission], [All Jobs Data].[Sales Rep Commission %]
FROM [All Jobs Data]
WHERE ((((CDate(Format([Loss Reported],"mm/dd/yyyy"))))>=[Start] And ((CDate(Format([Loss Reported],"mm/dd/yyyy"))))<=[End]));
I've created a query of 2 identical tables, combining different years of data.
There is a text field called "Loss Reported". Sample Data "1/1/2018 1:10:25 PM"
I created a new field in the query from "Loss Reported" to trim to time and convert the data to a true date (this works fine): New Job Date: (CDate(Format([Loss Reported],"mm/dd/yyyy")))
Next I want to query the date range, real simple 1/1/2020 to 12/31/2020, with a parameter.
This works
>=#1/1/2020# And <=#12/31/2020#
This doesn't
>=[Start Date] And <=[End Date]
What am I doing wrong? Any help is appreciated. Trying to have annual sales reports done this week.
Here's the SQl query if it's easier to solve (I haven't messed with the SQL Query.
SELECT [All Jobs Data].[(Do Not Modify) Invoice], [All Jobs Data].[(Do Not Modify) Row Checksum], [All Jobs Data].[(Do Not Modify) Modified On], [All Jobs Data].[Job #], [All Jobs Data].[Job Name], [All Jobs Data].[Job Type], [All Jobs Data].[Loss Reported], (CDate(Format([Loss Reported],"mm/dd/yyyy"))) AS [New Job Date], [All Jobs Data].Adjuster, [All Jobs Data].Contractor, [All Jobs Data].[Customer Contacted], [All Jobs Data].[Site Inspected], [All Jobs Data].[Rush Delivery Date], [All Jobs Data].[Invoice Sent], [All Jobs Data].[Program Complete Date], [All Jobs Data].Billed, [All Jobs Data].[Textiles Billed], [All Jobs Data].[Electronics Billed], [All Jobs Data].Received, [All Jobs Data].[Balance Due], [All Jobs Data].[Address 1], [All Jobs Data].[Address 2], [All Jobs Data].City, [All Jobs Data].State, [All Jobs Data].Zip, [All Jobs Data].[Bag Count], [All Jobs Data].Contaminant, [All Jobs Data].[Total Pieces Cleaned], [All Jobs Data].[Total Pieces Not Restored], [All Jobs Data].[Sales Rep], [All Jobs Data].[Sales Rep Commission], [All Jobs Data].[Sales Rep Commission %]
FROM [All Jobs Data]
WHERE ((((CDate(Format([Loss Reported],"mm/dd/yyyy"))))>=[Start] And ((CDate(Format([Loss Reported],"mm/dd/yyyy"))))<=[End]));