This is a revision to the Parameters query Null Error Trouble Thread.
I changed the query and am summing the quantity in the report only. The result of the report is still returning an error when the query does not produce a value for the Brand Name field when looking between the two specified dates.
This is my query:
SELECT [T Contents].[Brand Name], [T Contents].[Generic Drug Name], [T Contents].Strength, [T Removed].Date, [T Removed].[Drug Used], [T Removed].Quantity
FROM [T Contents] INNER JOIN [T Removed] ON [T Contents].ID=[T Removed].[Drug Used]
GROUP BY [T Contents].[Brand Name], [T Contents].[Generic Drug Name], [T Contents].Strength, [T Removed].Date, [T Removed].[Drug Used], [T Removed].Quantity
HAVING ((([T Contents].[Brand Name])=Forms![F Drug Used within Dates]![Brand Name]) And (([T Removed].Date) Between Forms![F Drug Used within Dates]!StartDate And Forms![F Drug Used within Dates]!EndDate));
Any help would be appreciated! Thanks in advance.
I changed the query and am summing the quantity in the report only. The result of the report is still returning an error when the query does not produce a value for the Brand Name field when looking between the two specified dates.
This is my query:
SELECT [T Contents].[Brand Name], [T Contents].[Generic Drug Name], [T Contents].Strength, [T Removed].Date, [T Removed].[Drug Used], [T Removed].Quantity
FROM [T Contents] INNER JOIN [T Removed] ON [T Contents].ID=[T Removed].[Drug Used]
GROUP BY [T Contents].[Brand Name], [T Contents].[Generic Drug Name], [T Contents].Strength, [T Removed].Date, [T Removed].[Drug Used], [T Removed].Quantity
HAVING ((([T Contents].[Brand Name])=Forms![F Drug Used within Dates]![Brand Name]) And (([T Removed].Date) Between Forms![F Drug Used within Dates]!StartDate And Forms![F Drug Used within Dates]!EndDate));
Any help would be appreciated! Thanks in advance.