I have a multi-select list box (Supplier ID and Supplier Name), and a report that is grouped by SupplierID. How do I make it so that the report will only display the Suppliers that are selected in the listbox?
Here is the current code for the report:
-------------------------
Just call me Captain Awesome.
Here is the current code for the report:
Code:
SELECT DISTINCTROW tblItem.[Item ID], tblItem.Item_Name, tblSupplier.SupplierID, tblSupplier.SupplierName, Avg(tblExpenseDetails.ConfirmedUnitPrice) AS [Avg Unit Price], Sum(tblExpenseDetails.NumberOfUnits) AS [Total Units]
FROM tblSupplier INNER JOIN ((tblItem INNER JOIN tblExpenseDetails ON tblItem.[Item ID] = tblExpenseDetails.ProductID) INNER JOIN tblItemCost ON tblItem.[Item ID] = tblItemCost.ItemID) ON (tblSupplier.SupplierID = tblItemCost.SupplierID) AND (tblSupplier.SupplierID = tblExpenseDetails.SupplierID)
GROUP BY tblItem.[Item ID], tblItem.Item_Name, tblSupplier.SupplierID, tblSupplier.SupplierName;
-------------------------
Just call me Captain Awesome.