T
Tom
I'm trying to get a Annual Summary Report that will show
the Inventory Count and Value of Animals for each farm on
hand as of each Friday for the year. The SQL for the
current inventory looks like this:
SELECT [TBL-Farms].Company, [TBL-Inventory].FarmID, [TBL-
Inventory].[Entry#], [TBL-Inventory].EntryDate, [TBL-
Inventory].TagID, [TBL-Inventory].Birthdate, [TBL-
Inventory].Breed, [TBL-Inventory].InventoryValue, [TBL-
Inventory].ExitDate, [TBL-Inventory].Reason, [TBL-
Inventory].CullValue, [TBL-Inventory].PaymentID, [TBL-
Inventory].PaymentDate,
FROM [TBL-Farms] INNER JOIN [TBL-Inventory] ON [TBL-
Farms].FarmID = [TBL-Inventory].FarmID
WHERE ((([TBL-Inventory].ExitDate) Is Null))
ORDER BY [TBL-Inventory].ID, [TBL-Inventory].EntryDate,
[TBL-Inventory].Breed;
This will give the list of Animals and then I use another
query to give me a summary by counting the active animals.
SELECT DISTINCTROW [Active Inventory by Farm Query].ID,
[TBL-Farms].Company, [Active Inventory by Farm
Query].Breed, Count(*) AS [Count Of Active Inventory by
Farm Query], Sum([Active Inventory by Farm
Query].InventoryValue) AS [Sum Of InventoryValue]
FROM [Active Inventory by Farm Query] INNER JOIN [TBL-
Farms] ON [Active Inventory by Farm Query].FarmID = [TBL-
Farms].FarmID
GROUP BY [Active Inventory by Farm Query].FarmID, [TBL-
Farms].Company, [Active Inventory by Farm Query].Breed;
Any suggestions?
the Inventory Count and Value of Animals for each farm on
hand as of each Friday for the year. The SQL for the
current inventory looks like this:
SELECT [TBL-Farms].Company, [TBL-Inventory].FarmID, [TBL-
Inventory].[Entry#], [TBL-Inventory].EntryDate, [TBL-
Inventory].TagID, [TBL-Inventory].Birthdate, [TBL-
Inventory].Breed, [TBL-Inventory].InventoryValue, [TBL-
Inventory].ExitDate, [TBL-Inventory].Reason, [TBL-
Inventory].CullValue, [TBL-Inventory].PaymentID, [TBL-
Inventory].PaymentDate,
FROM [TBL-Farms] INNER JOIN [TBL-Inventory] ON [TBL-
Farms].FarmID = [TBL-Inventory].FarmID
WHERE ((([TBL-Inventory].ExitDate) Is Null))
ORDER BY [TBL-Inventory].ID, [TBL-Inventory].EntryDate,
[TBL-Inventory].Breed;
This will give the list of Animals and then I use another
query to give me a summary by counting the active animals.
SELECT DISTINCTROW [Active Inventory by Farm Query].ID,
[TBL-Farms].Company, [Active Inventory by Farm
Query].Breed, Count(*) AS [Count Of Active Inventory by
Farm Query], Sum([Active Inventory by Farm
Query].InventoryValue) AS [Sum Of InventoryValue]
FROM [Active Inventory by Farm Query] INNER JOIN [TBL-
Farms] ON [Active Inventory by Farm Query].FarmID = [TBL-
Farms].FarmID
GROUP BY [Active Inventory by Farm Query].FarmID, [TBL-
Farms].Company, [Active Inventory by Farm Query].Breed;
Any suggestions?