I am totaly perplexed. I have a table which among other fields has two. One is ProductID the other is SupplierID. Each product is supplied from a specific supplier. I have a form with a combo box names SupplierID. The rowsource for thois combo box is:
SELECT distinctrow Suppliers.SupplierID, Suppliers.SupplierName from Suppliers ORDER BY Suppliers.SupplierName.
I also have a subform with a combo ProductID with a rowsource
SELECT Products.ProductID, Products.VendorProductNo, Products.ProductDescription, Products.UnitPrice, Products.SupplierID WHERE Products.SupplierID = Forms![form].SupplierID ORDER BY Products.ProductDescription.
I am trying to restrict the number of Products that can be selected for new entries to those supplied in the past by this supplier.
When I view the main form and records from the subform everything appears ok except for the productID combo box where nothing appears except for records added after I populated the SupplierID field in the products table. When I take out the WHERE keyword all the fields including the ProductID display fine.
Like I said, I totally perplexed.
HELP!!!
SELECT distinctrow Suppliers.SupplierID, Suppliers.SupplierName from Suppliers ORDER BY Suppliers.SupplierName.
I also have a subform with a combo ProductID with a rowsource
SELECT Products.ProductID, Products.VendorProductNo, Products.ProductDescription, Products.UnitPrice, Products.SupplierID WHERE Products.SupplierID = Forms![form].SupplierID ORDER BY Products.ProductDescription.
I am trying to restrict the number of Products that can be selected for new entries to those supplied in the past by this supplier.
When I view the main form and records from the subform everything appears ok except for the productID combo box where nothing appears except for records added after I populated the SupplierID field in the products table. When I take out the WHERE keyword all the fields including the ProductID display fine.
Like I said, I totally perplexed.
HELP!!!