I have two list boxes in a Form:
List box 1 Name: Select Ingredient
List box 1 Row Source: SELECT tblIngredients.IngredientID, tblIngredients.Ingredient
FROM tblIngredients
ORDER BY tblIngredients.Ingredient;
List box 1 Bound Column: 1
List box 2 Name: List Products
Table 1 Name: tblIngredients
Table 1 Field Name: IngredientID (AutoNumber)
Table 1 Field Name: Ingredient (Short Text); Indexed (No Duplicates)
Table 1 Field Name: IngredientDescription (Short Text)
Table 2 Name: tblProducts
Table 2 Field Name: ProductID (AutoNumber)
Table 2 Field Name: Product (Short Text); indexed (No Duplicates)
Table 2 Field Name: Product Description(Short Text)
Table 3 Name: tblProductIngredientJoin
Table 3 Field Name: ProductIngredientID (Autonumber)
Table 3 Field Name: ProductID (Number); Indexed (Duplicates OK)
Table 3 Field Name: IngredientID (Number); Indexed (Duplicates OK)
Relationship:
tblIngredients.IngredientID (1 to many with Enforce Referential Integrity) to tblProductIngredientJoin.IngredientID
tblProducts.Product (1 to many) to tblProductIngredientJoin.ProductID
I don’t know what I need to code in the 2nd unbound list box where I select an item from listbox 1 (Ingredient) and displays all the matching (Product) results in list box 2.
List box 1 Name: Select Ingredient
List box 1 Row Source: SELECT tblIngredients.IngredientID, tblIngredients.Ingredient
FROM tblIngredients
ORDER BY tblIngredients.Ingredient;
List box 1 Bound Column: 1
List box 2 Name: List Products
Table 1 Name: tblIngredients
Table 1 Field Name: IngredientID (AutoNumber)
Table 1 Field Name: Ingredient (Short Text); Indexed (No Duplicates)
Table 1 Field Name: IngredientDescription (Short Text)
Table 2 Name: tblProducts
Table 2 Field Name: ProductID (AutoNumber)
Table 2 Field Name: Product (Short Text); indexed (No Duplicates)
Table 2 Field Name: Product Description(Short Text)
Table 3 Name: tblProductIngredientJoin
Table 3 Field Name: ProductIngredientID (Autonumber)
Table 3 Field Name: ProductID (Number); Indexed (Duplicates OK)
Table 3 Field Name: IngredientID (Number); Indexed (Duplicates OK)
Relationship:
tblIngredients.IngredientID (1 to many with Enforce Referential Integrity) to tblProductIngredientJoin.IngredientID
tblProducts.Product (1 to many) to tblProductIngredientJoin.ProductID
I don’t know what I need to code in the 2nd unbound list box where I select an item from listbox 1 (Ingredient) and displays all the matching (Product) results in list box 2.