J
jwr
I have a report - Customer Sales - with a Report Date Range Form to open
the report. The date range can only be no greater than 8-5-05. I cannot
see why or how this is happening. I have used the same report date range
form (changing the report name, of course) and it works fine. Below is the
SQL behind my report.
Please look at this and see if you see why I am getting an error message.
If I go beyond 8-5-05, the message is that it is typed incorrectly or it is
too complicated to evaluate.
SELECT DISTINCTROW Customers.CompanyName, Sum([Sales by Customer
Subquery].[Total Sales]) AS [Total Sales], Sum(CLng([Sales by Customer
Subquery].[Total Sales]*[Sales by Customer Subquery].SalesTaxRate*100)/100)
AS [Sales Tax], Sum([Sales by Customer Subquery].FreightCharge) AS [Total
Freight], Sum([Sales by Customer Subquery].[Total Units]) AS [Total Units]
FROM Customers INNER JOIN [Sales by Customer Subquery] ON
Customers.CustomerID = [Sales by Customer Subquery].CustomerID
WHERE ((([Sales by Customer Subquery].OrderDate)>=[forms]![Report Date
Range]![Beginning Order Date] And ([Sales by Customer
Subquery].OrderDate)<=[forms]![Report Date Range]![Ending Order Date]))
GROUP BY Customers.CompanyName;
Joy
the report. The date range can only be no greater than 8-5-05. I cannot
see why or how this is happening. I have used the same report date range
form (changing the report name, of course) and it works fine. Below is the
SQL behind my report.
Please look at this and see if you see why I am getting an error message.
If I go beyond 8-5-05, the message is that it is typed incorrectly or it is
too complicated to evaluate.
SELECT DISTINCTROW Customers.CompanyName, Sum([Sales by Customer
Subquery].[Total Sales]) AS [Total Sales], Sum(CLng([Sales by Customer
Subquery].[Total Sales]*[Sales by Customer Subquery].SalesTaxRate*100)/100)
AS [Sales Tax], Sum([Sales by Customer Subquery].FreightCharge) AS [Total
Freight], Sum([Sales by Customer Subquery].[Total Units]) AS [Total Units]
FROM Customers INNER JOIN [Sales by Customer Subquery] ON
Customers.CustomerID = [Sales by Customer Subquery].CustomerID
WHERE ((([Sales by Customer Subquery].OrderDate)>=[forms]![Report Date
Range]![Beginning Order Date] And ([Sales by Customer
Subquery].OrderDate)<=[forms]![Report Date Range]![Ending Order Date]))
GROUP BY Customers.CompanyName;
Joy