I have two combo boxes: cboRepairCategory (plumbing, landscaping, etc) and cboVendors. I am using Stored Procedures in SQL to store the data from my database and then load them into the combo boxes.
The cboRepairCategory will be loaded first. Once the user has selected what type of repair it is I want it to restrict the amount of vendors that can be selected, so instead of saying:
CREATE PROCEDURE dbo.up_Fill_Vendor_Combo AS SELECT VendorID, CompanyName FROM Vendors ORDER BY CompanyName
I would select only the vendors that have the RepairType of say Landscaping, so the cboVendor would load now only Vendors with Landscaping instead of all vendors.
My question is this: Is this done in SQL in my Stored Procedure or is it done in VB in my functions for my combo boxes. I've never tried this before I am totally lost on it. I have fiddled with the code on both ends but to no avail. Thank you in advance!