Willebanks
New member
- Local time
- Today, 08:11
- Joined
- Mar 18, 2016
- Messages
- 3
Greetings All,
Let me start by saying I'm very new to MS Access and I might not have all the naming conventions correct but I'll try my best to convey my issue.
I have a small shipping and receiving database that I wrote some years ago to keep track of a small warehouse where I work. I created a query that I use to populate a report that basically tells me how much of any / all item(s) have been shipped from the beginning of the year. Below is the SQL view of that query.
SELECT DISTINCTROW [Orders by Schools Details].ProductID, [Orders by Schools Details].Description, Sum([Orders by Schools Details].Shipped) AS Total, [Orders by Schools Details].UnitCost, CCur(Sum([Orders by Schools Details].Shipped*[UnitCost])) AS [Line Total]
FROM [Orders by School] INNER JOIN [Orders by Schools Details] ON [Orders by School].OrderID = [Orders by Schools Details].OrderID
GROUP BY [Orders by Schools Details].ProductID, [Orders by Schools Details].Description, [Orders by Schools Details].UnitCost
HAVING (((Sum([Orders by Schools Details].Shipped))>0));
This little query has suited me for 10 years but now I'd like to know the total of items shipped during any particular date range: Below is what I tried.
SELECT DISTINCTROW [Orders by Schools Details].ProductID, [Orders by Schools Details].Description, Sum([Orders by Schools Details].Shipped) AS Total, [Orders by Schools Details].UnitCost, CCur(Sum([Orders by Schools Details].Shipped*[UnitCost])) AS [Line Total]
FROM [Orders by School] INNER JOIN [Orders by Schools Details] ON [Orders by School].OrderID = [Orders by Schools Details].OrderID
GROUP BY [Orders by Schools Details].ProductID, [Orders by Schools Details].Description, [Orders by Schools Details].UnitCost, [Orders by School].OrderDate
HAVING (((Sum([Orders by Schools Details].Shipped))>0) AND (([Orders by School].OrderDate) Between [Start Date] And [End Date]));
The problem is that the moment I add anything to do with dates I get individual lines for every item that was shipped not the nice totals I'm used to seeing...I can't figure out how to get Access to "Total" each item shipped.
Any help with this would be a blessing as I'm nearly bald over this and I almost certain the solution is probably laughably easy I'm just too new to see it.
Thanks in advance!
Will
Let me start by saying I'm very new to MS Access and I might not have all the naming conventions correct but I'll try my best to convey my issue.
I have a small shipping and receiving database that I wrote some years ago to keep track of a small warehouse where I work. I created a query that I use to populate a report that basically tells me how much of any / all item(s) have been shipped from the beginning of the year. Below is the SQL view of that query.
SELECT DISTINCTROW [Orders by Schools Details].ProductID, [Orders by Schools Details].Description, Sum([Orders by Schools Details].Shipped) AS Total, [Orders by Schools Details].UnitCost, CCur(Sum([Orders by Schools Details].Shipped*[UnitCost])) AS [Line Total]
FROM [Orders by School] INNER JOIN [Orders by Schools Details] ON [Orders by School].OrderID = [Orders by Schools Details].OrderID
GROUP BY [Orders by Schools Details].ProductID, [Orders by Schools Details].Description, [Orders by Schools Details].UnitCost
HAVING (((Sum([Orders by Schools Details].Shipped))>0));
This little query has suited me for 10 years but now I'd like to know the total of items shipped during any particular date range: Below is what I tried.
SELECT DISTINCTROW [Orders by Schools Details].ProductID, [Orders by Schools Details].Description, Sum([Orders by Schools Details].Shipped) AS Total, [Orders by Schools Details].UnitCost, CCur(Sum([Orders by Schools Details].Shipped*[UnitCost])) AS [Line Total]
FROM [Orders by School] INNER JOIN [Orders by Schools Details] ON [Orders by School].OrderID = [Orders by Schools Details].OrderID
GROUP BY [Orders by Schools Details].ProductID, [Orders by Schools Details].Description, [Orders by Schools Details].UnitCost, [Orders by School].OrderDate
HAVING (((Sum([Orders by Schools Details].Shipped))>0) AND (([Orders by School].OrderDate) Between [Start Date] And [End Date]));
The problem is that the moment I add anything to do with dates I get individual lines for every item that was shipped not the nice totals I'm used to seeing...I can't figure out how to get Access to "Total" each item shipped.
Any help with this would be a blessing as I'm nearly bald over this and I almost certain the solution is probably laughably easy I'm just too new to see it.
Thanks in advance!
Will