Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List Box to select Suppliers

Status
Not open for further replies.

grande

Programmer
Feb 14, 2005
657
CA
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:
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.
 
Ah, that's great I knew it'd be easy! Why couldn't I find that thread! I searched all over the place >_<

-------------------------
Just call me Captain Awesome.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top