Quote:
Originally Posted by Stewart Ross Inverness
Hi. Reviewing your first post in light of what you say about dummy fields I can't understand what you are trying to achieve here. If you have had to add dummy fields to bind your combos (by which I take it you mean that they are fields otherwise unused except to allow the individual combo selections to work) what was it you expected the combos to do for you in the first place?
Cascading combo selections are normally used to filter groups of records shown on forms and subforms, and in most circumstances their placement is at the level 'above' that of the records concerned.
-Stewart
Hi missinglinq and Steward,
Thanks first for your comments. To missinglinq: the cboProductID is also bound. To Steward: the main reason for using cascading combo boxes is indeed to filter the number of selection items. I think it is very common for an order system to limit the number of products for selection (imagine there are hundreds or even thousands of products!). One of the more efficient ways I can think of is to group products into categories. That's why I used cboCategoryID as the first combo box. After selecting the cboCategoryID combo box, the number of corresponding products will be much fewer. However, as I posted in the first question, using an unbound combo box for selecting categories won't work. Therefore, as suggested by Steward, I have to bind the combo box by using a Dummy field as a workaround. Sadly, the problem is solved only partially: the values in cboProductID in every row are changed due to the selection of the product categories. I hope that I describe the problem clear enough. Again, I list the main structures of the related tables:
tblCategory: CategoryID*, CategoryName
tblProduct: ProductID*, ProductName, CategoryID
tblOrder: OrderID*, CustomerID
tblOrderDetail: OrderID*, ProductID*, Dummy
The form for adding an order is a main single form (frmOrder) accompanied by a continuous sub-form (sfmOrderDetail). So, how do I add/select a product without having to scan tens, hundreds, or even thousands of products? I tried to use a combo box cboCategoryID (bound to a Dummy field in tblOrderDetail) to select the category of the product. And, supposedly, the proper products belonging to that category will show up in the combo box cboProductID, which is bound to ProductID in tblOrderDetail. The problem is that the values in cboProductID in every row get refreshed very time I make a category selection. So, how do I solve the problem? Thanks in advance.